Works with cython 3.0.6, fails on default branch with:
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [53 lines of output]
Error compiling Cython file:
------------------------------------------------------------
...
buffer.strides = NULL
buffer.suboffsets = NULL
buffer.itemsize = 1
buffer.internal = NULL
def __getsegcount__(self, lenp: pointer(Py_ssize_t)) -> C.int:
^
------------------------------------------------------------
zmq/backend/cython/_zmq.py:374:30: Cannot convert Python object argument to type 'Py_ssize_t *'
Error compiling Cython file:
------------------------------------------------------------
...
# required for getreadbuffer
if lenp != NULL:
lenp[0] = zmq_msg_size(address(self.zmq_msg))
return 1
def __getreadbuffer__(self, idx: Py_ssize_t, p: pointer(p_void)) -> Py_ssize_t:
^
------------------------------------------------------------
zmq/backend/cython/_zmq.py:380:49: Cannot convert Python object argument to type 'void **'
Compiling zmq/backend/cython/_zmq.py because it changed.
[1/1] Cythonizing zmq/backend/cython/_zmq.py
Traceback (most recent call last):
File "/home/tcaswell/.virtualenvs/cp_main/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
~~~~^^
File "/home/tcaswell/.virtualenvs/cp_main/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tcaswell/.virtualenvs/cp_main/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tcaswell/.virtualenvs/cp_main/lib/python3.13/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
self.run_setup()
~~~~~~~~~~~~~~^^
File "/home/tcaswell/.virtualenvs/cp_main/lib/python3.13/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 1304, in <module>
File "/home/tcaswell/.virtualenvs/cp_main/lib/python3.13/site-packages/Cython/Build/Dependencies.py", line 1131, in cythonize
cythonize_one(*args)
~~~~~~~~~~~~~^^^^^^^
File "/home/tcaswell/.virtualenvs/cp_main/lib/python3.13/site-packages/Cython/Build/Dependencies.py", line 1298, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: zmq/backend/cython/_zmq.py
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Works with cython 3.0.6, fails on default branch with:
This bisects to 9a22b49cb8573c5085994d8c9c5da2de6b2b577d / https://github.com/cython/cython/pull/5869