You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mojimoji.pyx is converted to C++ code using PyUnicode_FromUnicode.
However, PyUnicode_FromUnicode is a legacy interface and has been removed in Python 3.12.
Therefore, the following error occurs on Python 3.12.
[20:21:32] tpdn@GrandMacdoBookProXP /Users/tpdn/gitlab/tpdn/hoge [2]
> pdm add mojimoji
Adding packages to default dependencies: mojimoji
🔒 Lock successful
Changes are written to pyproject.toml.
Synchronizing working set with resolved packages: 1 to add, 0 to update, 0 to remove
✖ Install mojimoji 0.0.12 failed
Retry failed jobs
✖ Install mojimoji 0.0.12 failed
ERRORS:
add mojimoji failed:
Traceback (most recent call last):
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pdm/installers/synchronizers.py", line
283, in install_candidate
self.manager.install(can)
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pdm/installers/manager.py", line 33,
in install
installer(str(prepared.build()), self.environment, prepared.direct_url())
^^^^^^^^^^^^^^^^
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pdm/models/candidates.py", line 395,
in build
self.wheel = Path(builder.build(build_dir, metadata_directory=self._metadata_dir))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pdm/builders/wheel.py", line 28, in
build
filename = self._hook.build_wheel(out_dir, config_settings, metadata_directory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pyproject_hooks/_impl.py", line 209,
in build_wheel
return self._call_hook('build_wheel', {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pyproject_hooks/_impl.py", line 311,
in _call_hook
self._subprocess_runner(
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pdm/builders/base.py", line 260, in
subprocess_runner
return log_subprocessor(cmd, cwd, extra_environ=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tpdn/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pdm/builders/base.py", line 107, in
log_subprocessor
raise build_error(e) from None
pdm.exceptions.BuildError: Build backend raised error: Showing the last 10 lines of the build output:
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
^
mojimoji.cpp:5212:16: error: use of undeclared identifier 'PyUnicode_FromUnicode'
__pyx_t_10 = __Pyx_PyUnicode_FromUnicode(__pyx_v_buf); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 186,
__pyx_L1_error)
^
mojimoji.cpp:1323:46: note: expanded from macro '__Pyx_PyUnicode_FromUnicode'
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
^
2 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
See /var/folders/1b/fvjyq4dn47d19yyhd39w4qs80000gn/T/pdm-install-n40llblw.log for detailed debug log.
[InstallationError]: Some package operations are not complete yet
Add '-v' to see the detailed traceback
The text was updated successfully, but these errors were encountered:
Cythonについてはあまり詳しくないのですが、Cythonのコードがc++に変換される際に
PyUnicode_FromUnicode
を使用しているように見えます。これは削除が予告されていた非推奨APIであり、予告通りに3.12.0にて削除されたためエラーが発生しています。
mojimoji.pyx
is converted to C++ code usingPyUnicode_FromUnicode
.However,
PyUnicode_FromUnicode
is a legacy interface and has been removed in Python 3.12.Therefore, the following error occurs on Python 3.12.
The text was updated successfully, but these errors were encountered: