Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cython 3.0.0b1 and its impact on packages in Fedora #5305

Closed
hrnciar opened this issue Mar 10, 2023 · 11 comments
Closed

Cython 3.0.0b1 and its impact on packages in Fedora #5305

hrnciar opened this issue Mar 10, 2023 · 11 comments

Comments

@hrnciar
Copy link
Contributor

hrnciar commented Mar 10, 2023

Describe your issue

Hello,

I've tried to rebuild all Python packages in Fedora Rawhide (Fedora 39, development version) requiring Cython with new Cython 3.0.0b1. Out of 181 packages, 67 of them succeeded with legacy Cython 0.29.33 but failed with 3.0.0b1. 21 packages failed with both Cythons, those were ignored. I used Python 3.11.2 on x86_64. I went through the logs and I'd like to present the failures I've encountered. I've only kept very small log snippets to save some space. If you are curious about the complete logs, each package name links to COPR build system where you can find it. E.g. scipy, to see a log, click on build ID and then choose builder-live.log.gz (choose the one in the table at the bottom, not the one that says Source build logs). I've grouped the failures that I assumed are similar enough.

The logs might be garbage-collected in few weeks. Feel free to ping me or @hroncok to restart the build.

Cannot assign type 'XXX (YYY) except * nogil' to 'XXX (YYY) noexcept (20 affected projects)

- ceph

rbd.pyx:2926:62: Cannot assign type 'void (rbd_completion_t, void *) except * nogil' to 'rbd_callback_t'

- grpc

src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi:310:4: Cannot assign type 'grpc_ssl_certificate_config_reload_status (void *, grpc_ssl_server_certificate_config **) except * nogil' to 'grpc_ssl_server_certificate_config_callback'

- libfreenect

/builddir/build/BUILD/libfreenect-0.6.4/wrappers/python/freenect.pyx:351:46: Cannot assign type 'void (freenect_device *, void *, uint32_t) except * nogil' to 'freenect_depth_cb'
/builddir/build/BUILD/libfreenect-0.6.4/wrappers/python/freenect.pyx:360:46: Cannot assign type 'void (freenect_device *, void *, uint32_t) except * nogil' to 'freenect_video_cb'

- mlpack

mpi4py/MPI/atimport.pxi:174:17: Cannot assign type 'void (void) except * nogil' to 'void (*)(void) noexcept'
mpi4py/MPI/opimpl.pxi:221:29: Cannot assign type 'void (MPIAPI )(void *, void *, int *, MPI_Datatype *) except * nogil' to 'MPI_User_function *'

- petsc

PETSc/Vec.pyx:551:53: Cannot assign type 'void (object) except *' to 'PyCapsule_Destructor'
PETSc/PETSc.pyx:336:24: Cannot assign type 'int (*)(FILE *, const char *, va_list) except *' to 'int (*)(FILE *, char *, va_list) noexcept'
PETSc/PETSc.pyx:405:17: Cannot assign type 'void (void) except * nogil' to 'void (*)(void) noexcept'
error: Cython failure: 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'

- pyliblo

src/liblo.pyx:600:59: Cannot assign type 'void (int, const_char *, const_char *) except * nogil' to 'lo_err_handler'

- pyproj

pyproj/_datadir.pyx:131:33: Cannot assign type 'void (void *, int, const char *) except * nogil' to 'PJ_LOG_FUNCTION'

- python-basemap

packages/basemap/src/_geoslib.pyx:136:9: Cannot assign type 'void (char *, char *) except *' to 'GEOSMessageHandler'

- python-calcephy

calcephpy.pyx:1357:51: Cannot assign type 'void (const char *) except *' to 'void (*)(const char *) noexcept'

- python-cipari2

cypari2/handle_error.pyx:152:26: Cannot assign type 'void (long) except *' to 'void (*)(long) noexcept'

- python-gbinder

gbinder.pyx:194:85: Cannot assign type 'void (GBinderClient *, GBinderRemoteReply *, int, void *) except * nogil' to 'GBinderClientReplyFunc'
gbinder.pyx:194:104: Cannot assign type 'void (void *) except * nogil' to 'GDestroyNotify'
gbinder.pyx:492:79: Cannot assign type 'GBinderLocalReply *(GBinderLocalObject *, GBinderRemoteRequest *, unsigned int, unsigned int, int *, void *) except * nogil' to 'GBinderLocalTransactFunc'
gbinder.pyx:599:101: Cannot assign type 'void (GBinderServiceManager *, GBinderRemoteObject *, int, void *) except * nogil' to 'GBinderServiceManagerGetServiceFunc'
gbinder.pyx:622:114: Cannot assign type 'void (GBinderServiceManager *, int, void *) except * nogil' to 'GBinderServiceManagerAddServiceFunc'
gbinder.pyx:641:99: Cannot assign type 'void (GBinderServiceManager *, void *) except * nogil' to 'GBinderServiceManagerFunc'
gbinder.pyx:651:124: Cannot assign type 'void (GBinderServiceManager *, const char *, void *) except * nogil' to 'GBinderServiceManagerRegistrationFunc'

- python-kmod

kmod/module.pyx:135:37: Cannot assign type 'int (*)(kmod_module *, const_char_ptr, void *) 
except *' to 'int (*)(kmod_module *, const_char_ptr, void *) noexcept'
kmod/module.pyx:135:49: Cannot assign type 'void (*)(kmod_module *, bool, const_char_ptr) except *' to 'void (*)

- python-llfuse

src/fuse_api.pxi:439:57: Cannot assign type 'void *(*)(void *) except * nogil' to 'void *(*)(void *) noexcept nogil'

- python-lxml

src/lxml/parser.pxi:586:34: Cannot assign type 'void (void *, xmlError *) except * nogil' to 'xmlStructuredErrorFunc'
src/lxml/parser.pxi:938:35: Cannot assign type 'void (void *) except * nogil' to 'startDocumentSAXFunc'
src/lxml/saxparser.pxi:132:37: Cannot assign type 'void (void *, const_xmlChar *, const_xmlChar *, const_xmlChar *, int, const_xmlChar **, int, int, const_xmlChar **) except * nogil' to 'startElementNsSAX2Func'
src/lxml/saxparser.pxi:134:35: Cannot assign type 'void (void *, const_xmlChar *, const_xmlChar **) except * nogil' to 'startElementSAXFunc'
src/lxml/saxparser.pxi:141:35: Cannot assign type 'void (void *, const_xmlChar *, const_xmlChar *, const_xmlChar *) except * nogil' to 'endElementNsSAX2Func'
src/lxml/saxparser.pxi:143:33: Cannot assign type 'void (void *, const_xmlChar *) except * nogil' to 'endElementSAXFunc'
src/lxml/saxparser.pxi:147:46: Cannot assign type 'void (void *, const_xmlChar *, int) except * nogil' to 'charactersSAXFunc'
src/lxml/saxparser.pxi:147:46: Cannot assign type 'void (void *, const_xmlChar *, int) except * nogil' to 'cdataBlockSAXFunc'
src/lxml/saxparser.pxi:152:33: Cannot assign type 'void (void *, const_xmlChar *, const_xmlChar *, const_xmlChar *) except * nogil' to 'internalSubsetSAXFunc'
src/lxml/saxparser.pxi:156:40: Cannot assign type 'void (void *, const_xmlChar *, const_xmlChar *) except * nogil' to 'processingInstructionSAXFunc'
src/lxml/saxparser.pxi:160:26: Cannot assign type 'void (void *, const_xmlChar *) except * nogil' to 'commentSAXFunc'
src/lxml/xpath.pxi:33:12: Cannot assign type 'void (xmlXPathParserContext *, int) except * nogil' to 'xmlXPathFunction'
src/lxml/xpath.pxi:86:36: Cannot assign type 'void (void *, void *, const_xmlChar *) except *' to 'xmlHashScanner'

- python-pari-jupyter

PARIKernel/kernel.pyx:105:30: Cannot assign type 'void (long) except * nogil' to 'void (*)(long) noexcept nogil'

- python-peewee

playhouse/_sqlite_ext.pyx:608:40: Cannot assign type 'double' to 'sqlite3_int64'
playhouse/_sqlite_ext.pyx:1442:48: Cannot assign type 'void (void *) except * nogil' to 'void (*)(void *) noexcept nogil'
playhouse/_sqlite_ext.pyx:1452:46: Cannot assign type 'void (void *, int, const char *, const char *, sqlite3_int64) except * nogil' to 'void (*)(void *, int, char *, char *, sqlite3_int64) noexcept nogil'

- python-rtmidi

src/_rtmidi.pyx:907:33: Cannot assign type 'void (*)(double, vector[unsigned char] *, void *) except * nogil' to 'RtMidiCallback'

- python-uamqp

./src/amqp_management.pyx:74:71: Cannot assign type 'void (void *, AMQP_MANAGEMENT_OPEN_RESULT_TAG) except *' to 'ON_AMQP_MANAGEMENT_OPEN_COMPLETE'
./src/amqp_management.pyx:74:114: Cannot assign type 'void (void *) except *' to 'ON_AMQP_MANAGEMENT_ERROR'
./src/amqp_management.pyx:92:137: Cannot assign type 'void (void *, AMQP_MANAGEMENT_EXECUTE_OPERATION_RESULT_TAG, unsigned int, const char *, MESSAGE_HANDLE) except *' to 'ON_AMQP_MANAGEMENT_EXECUTE_OPERATION_COMPLETE'
./src/connection.pyx:23:53: Cannot assign type 'void (void *, CONNECTION_STATE_TAG, CONNECTION_STATE_TAG) except *' to 'ON_CONNECTION_STATE_CHANGED'
./src/connection.pyx:23:82: Cannot assign type 'void (void *) except *' to 'ON_IO_ERROR'
./src/message_receiver.pyx:23:26: Cannot assign type 'void (void *, MESSAGE_RECEIVER_STATE_TAG, MESSAGE_RECEIVER_STATE_TAG) except *' to 'ON_MESSAGE_RECEIVER_STATE_CHANGED'
./src/message_sender.pyx:26:24: Cannot assign type 'void (void *, MESSAGE_SENDER_STATE_TAG, MESSAGE_SENDER_STATE_TAG) except *' to 'ON_MESSAGE_SENDER_STATE_CHANGED'
./src/message_sender.pyx:87:121: Cannot assign type 'void (void *, MESSAGE_SEND_RESULT_TAG, AMQP_VALUE) except *' to 'ON_MESSAGE_SEND_COMPLETE'

- setools

setools/policyrep/selinuxpolicy.pxi:671:46: Cannot assign type 'void (void *, sepol_handle_t *, const char *, ...) except *' to 'msg_callback'

- vapoursynth

src/cython/vapoursynth.pyx:230:25: Cannot assign type 'void (__stdcall )(int, const char *, void *) except * nogil' to 'VSLogHandler'
src/cython/vapoursynth.pyx:230:33: Cannot assign type 'void (__stdcall )(void *) except * nogil' to 'VSLogHandlerFree'
src/cython/vapoursynth.pyx:602:49: Cannot assign type 'void (__stdcall )(const VSMap *, VSMap *, void *, VSCore *, const VSAPI *) except * nogil' to 'VSPublicFunction'
src/cython/vapoursynth.pyx:602:80: Cannot assign type 'void (__stdcall )(void *) except * nogil' to 'VSFreeFunctionData'
src/cython/vapoursynth.pyx:1628:51: Cannot assign type 'void (__stdcall )(void *, const VSFrame *, int, VSNode *, const char *) except * nogil' to 'VSFrameDoneCallback'

Cannot assign type 'XXX (YYY) except? -1 nogil' to 'ZZZ *' (14 affected projects)

- cantera

build/python/cantera/func1.pyx:89:38: Cannot assign type 'double (double, void *, void **) except? -1' to 'callback_wrapper'

- ceph

rbd.pyx:762:23: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1 nogil' to 'librbd_progress_fn_t'
rbd.pyx:759:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t'

- h5py

h5py/_errors.pyx:123:52: Cannot assign type 'herr_t (unsigned int, const H5E_error_t *, void *) except? -1 nogil' to 'H5E_walk_t'

- mlpack

mpi4py/MPI/commimpl.pxi:126:35: Cannot assign type 'int (MPIAPI )(MPI_Comm, int, void *, void *) except? -1 nogil' to 'MPI_Comm_delete_attr_function *'
mpi4py/MPI/Request.pyx:433:12: Cannot assign type 'int (MPIAPI )(void *, MPI_Status *) except? -1 nogil' to 'MPI_Grequest_query_function *'
mpi4py/MPI/Request.pyx:433:27: Cannot assign type 'int (MPIAPI )(void *) except? -1 nogil' to 'MPI_Grequest_free_function *'
mpi4py/MPI/Request.pyx:433:41: Cannot assign type 'int (MPIAPI )(void *, int) except? -1 nogil' to 'MPI_Grequest_cancel_function *'
mpi4py/MPI/File.pyx:870:47: Cannot assign type 'int (MPIAPI )(MPI_Datatype, MPI_Aint *, void *) except? -1 nogil' to 'MPI_Datarep_extent_function *'
mpi4py/MPI/File.pyx:872:34: Cannot assign type 'int (MPIAPI )(void *, MPI_Datatype, int, void *, MPI_Offset, void *) except? -1 nogil' to 'MPI_Datarep_conversion_function *'

- petsc

PETSc/cyclicgc.pxi:34:20: Cannot assign type 'int (PyObject *, visitproc, void *) except? -1' to 'traverseproc *'
PETSc/cyclicgc.pxi:35:20: Cannot assign type 'int (PyObject *) except? -1' to 'inquiry *'

- pyliblo

src/liblo.pyx:457:49: Cannot assign type 'int (const_char *, const_char *, lo_arg **, int, lo_message, void *) except? -1 nogil' to 'lo_method_handler'
src/liblo.pyx:512:52: Cannot assign type 'int (lo_timetag, void *) except? -1 nogil' to 'lo_bundle_start_handler'
src/liblo.pyx:513:38: Cannot assign type 'int (void *) except? -1 nogil' to 'lo_bundle_end_handler'

- python-gbinder

gbinder.pyx:575:64: Cannot assign type 'bool (GBinderServiceManager *, char **, void *) except? -1 nogil' to 'GBinderServiceManagerListFunc'

- python-lxml

src/lxml/parser.pxi:292:37: Cannot assign type 'int (void *, char *, int) except? -1 nogil' to 'xmlInputReadCallback'
src/lxml/serializer.pxi:671:63: Cannot assign type 'int (void *) except? -1' to 'xmlOutputCloseCallback'

- python-peewee

playhouse/_sqlite_ext.pyx:608:40: Cannot assign type 'double' to 'sqlite3_int64'
playhouse/_sqlite_ext.pyx:1432:46: Cannot assign type 'int (void *) except? -1 nogil' to 'int (*)(void *) noexcept nogil'
playhouse/_sqlite_ext.pyx:1463:43: Cannot assign type 'int (void *, int) except? -1 nogil' to 'int (*)(void *, int) noexcept nogil'

- python-pymssql

src/pymssql/_mssql.pyx:2173:16: Cannot assign type 'int (DBPROCESS *, int, int, int, char *, char *) except? -1 nogil' to 'EHANDLEFUNC'
src/pymssql/_mssql.pyx:2174:16: Cannot assign type 'int (DBPROCESS *, DBINT, int, int, char *, char *, char *, LINE_T) except? -1 nogil' to 'MHANDLEFUNC'

- python-smartcols

smartcols.pyx:332:43: Cannot assign type 'int (libscols_cell *, libscols_cell *, void *) except? -1' to 'int (*)(libscols_cell *, libscols_cell *, void *) noexcept'
smartcols.pyx:358:34: Cannot assign type 'size_t (const libscols_column *, const char *, void *) except? -1' to 'size_t (*)(const libscols_column *, const char *, void *) noexcept'
smartcols.pyx:358:53: Cannot assign type 'char *(const libscols_column *, char *, void *) except? NULL' to 'char *(*)(const libscols_column *, char *, void *) noexcept'

- python-tables

tables/utilsextension.pyx:382:47: Cannot assign type 'herr_t (unsigned int, const H5E_error_t *, void *) except? -1 nogil' to 'H5E_walk_t'

- scipy

_biasedurn.pyx:118:39: Cannot assign type 'double (*)(void) except? -1 nogil' to 'double (*)(void) noexcept nogil'

- urh

src/urh/dev/native/lib/airspy.pyx:86:46: Cannot assign type 'int (airspy_transfer *) except? -1 nogil' to 'airspy_sample_block_cb_fn'

(others) Cannot assign type 'XXX' to 'YYY' (7 affected projects)

- libgpuarray

pygpu/collectives.pyx:394:55: Cannot assign type 'double' to 'size_t'

- music

pybuffer.pyx:63:31: Cannot assign type 'double' to 'Py_ssize_t'

- pygame

src_c/cython/pygame/_sdl2/mixer.pyx:45:27: Cannot assign type 'mixcallback' to 'void (*)(void *, Uint8 *, int) noexcept nogil'

- python-jnius

jnius/jnius_conversion.pxi:521:45: Cannot assign type 'double' to 'jsize'

- python-peewee

playhouse/_sqlite_ext.pyx:608:40: Cannot assign type 'double' to 'sqlite3_int64'

- python-pysam

pysam/libcalignedsegment.pyx:1426:37: Cannot assign type 'double' to 'Py_ssize_t'

- python-statmodels

statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx:156:55: Cannot assign type 'npy_float64 complex' to 'float64_t'

is not a type identifier (5 affected projects)

- libarrow

pyarrow/_compute.pxd:45:42: 'Schema' is not a type identifier

- mlpack

mlpack/image_converter.pyx:91:7: 'Params' is not a type identifier

- python-cysignals

src/cysignals/signals.pyx:39:4: 'cysigs_t' is not a type identifier

- python-giacpy

giacpy/giacpy2qcas.pyx:10:11: 'Pygen' is not a type identifier

- python-pyedflib

pyedflib/_extensions/_pyedflib.pyx:137:9: 'edf_hdr_struct' is not a type identifier
pyedflib/_extensions/_pyedflib.pyx:457:9: 'edf_annotation_struct' is not a type identifier

Various cimports/imports not found (3+2 affected projects)

- mlpack

mlpack/image_converter.pyx:1:8: 'arma.pxd' not found
mlpack/image_converter.pyx:2:8: 'arma_numpy.pxd' not found
mlpack/image_converter.pyx:3:0: 'io.pxd' not found
mlpack/image_converter.pyx:3:0: 'io/IO.pxd' not found
mlpack/image_converter.pyx:4:0: 'params.pxd' not found
mlpack/image_converter.pyx:4:0: 'params/Params.pxd' not found
mlpack/image_converter.pyx:5:0: 'timers.pxd' not found
mlpack/image_converter.pyx:5:0: 'timers/Timers.pxd' not found
mlpack/image_converter.pyx:6:0: 'io/SetParam.pxd' not found
mlpack/image_converter.pyx:6:0: 'io/SetParamPtr.pxd' not found
mlpack/image_converter.pyx:6:0: 'io/SetParamWithInfo.pxd' not found
mlpack/image_converter.pyx:6:0: 'io/GetParamPtr.pxd' not found
mlpack/image_converter.pyx:7:0: 'io/EnableVerbose.pxd' not found
mlpack/image_converter.pyx:7:0: 'io/DisableVerbose.pxd' not found
mlpack/image_converter.pyx:7:0: 'io/DisableBacktrace.pxd' not found
mlpack/image_converter.pyx:7:0: 'io/ResetTimers.pxd' not found
mlpack/image_converter.pyx:7:0: 'io/EnableTimers.pxd' not found
mlpack/image_converter.pyx:10:0: 'serialization.pxd' not found
mlpack/image_converter.pyx:10:0: 'serialization/SerializeIn.pxd' not found
mlpack/image_converter.pyx:10:0: 'serialization/SerializeOut.pxd' not found
mlpack/image_converter.pyx:10:0: 'serialization/SerializeOutJSON.pxd' not found
mlpack/image_converter.pyx:10:0: 'serialization/SerializeInJSON.pxd' not found

- python-giacpy

giacpy/giacpy2qcas.pyx:1:8: 'giacpy2qcas.pxd' not found
giacpy/giacpy2qcas.pyx:6:0: 'giacpy/Pygen.pxd' not found
giacpy/giacpy2qcas.pyx:7:0: 'giacpy/context_ptr.pxd' not found

- python-pyedflib

pyedflib/_extensions/_pyedflib.pyx:25:8: 'c_edf.pxd' not found

- numpy

ModuleNotFoundError: No module named '_pickleable_module_global'

- python-healpy

ModuleNotFoundError: No module named '_pixelfunc'

Cannot convert Python object to '' (4 affected projects)

- libarrow  

pyarrow/_compute.pyx:337:55: Cannot convert Python object to 'CMemoryPool *'

- python-cysignals

src/cysignals/signals.pyx:168:21: Cannot convert Python object to 'PyObject *' 

- python-gevent

giacpy/giacpy2qcas.pyx:16:36: Cannot convert Python object to 'gen'

- sagemath

sage/ext/stdsage.pxd:22:40: Cannot convert Python object to 'PyObject *'

Compiler crash in AnalyseExpressionsTransform (3 affected projects)

- mlpack

mlpack/image_converter.pyx:131:28: Compiler crash in AnalyseExpressionsTransform

- python-pyedflib

pyedflib/_extensions/_pyedflib.pyx:205:22: Compiler crash in AnalyseExpressionsTransform

- python-pywt

pywt/_extensions/_pywt.pyx:400:37: Compiler crash in AnalyseExpressionsTransform

Pinned Cython < 3 version (3 projects)

- python-neatdend

requirements/requirements.txt:cython~=0.29.4

- python-shapely

requirements-dev.txt:cython>=0.29.24

- python-uvloop

setup.py:CYTHON_DEPENDENCY = 'Cython(>=0.29.32,<0.30.0)'

undefined symbol PyMemoryview_Check (2 affected projects)

- borgbackup

E   ImportError: /builddir/build/BUILDROOT/borgbackup-1.2.3-2.fc39.x86_64/usr/lib64/python3.11/site-packages/borg/compress.cpython-311-x86_64-linux-gnu.so: undefined symbol: PyMemoryview_Check

- netcdf4

ImportError:    /builddir/build/BUILD/netcdf4-python-1.6.2rel/build/lib.linux-x86_64-cpython-311/netCDF4/_netCDF4.cpython-311-x86_64-linux-gnu.so: undefined symbol: PyMemoryview_Check

ambiguous overloaded method (2 affected projects)

- cantera

build/python/cantera/delegator.pyx:253:33: ambiguous overloaded method

- libarrow

pyarrow/_compute.pyx:1541:24: ambiguous overloaded method

no suitable method found (2 affected projects)

- cantera

build/python/cantera/delegator.pyx:254:26: no suitable method found

- libarrow

pyarrow/_compute.pyx:450:32: no suitable method found

The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. (2 affected projects)

- libarrow

pyarrow/lib.pxd:67:60: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.

- python-cysignals

src/cysignals/signals.pxd:57:56: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.

cimported module has no attribute 'numpy_to_mat_d' (2 affected projects)

- mlpack

mlpack/image_converter.pyx:131:28: cimported module has no attribute 'numpy_to_mat_d'

- python-pyedflib

pyedflib/_extensions/_pyedflib.pyx:118:16: cimported module has no attribute 'edflib_version'
pyedflib/_extensions/_pyedflib.pyx:171:17: cimported module has no attribute 'edfclose_file'
pyedflib/_extensions/_pyedflib.pyx:205:22: cimported module has no attribute 'edfopen_file_readonly'

TypeError: unsupported operand type(s) for -: 'XXX' and 'YYY' (2 affected projects)

- python-cftime

TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'cftime._cftime.DatetimeGregorian'

- python-orderedset

TypeError: unsupported operand type(s) for -: 'list' and 'OrderedSet'
TypeError: unsupported operand type(s) for &: 'list' and 'OrderedSet'
TypeError: unsupported operand type(s) for |: 'list' and 'OrderedSet'

Cannot convert '' to Python object (2 affected projects)

- libarrow

pyarrow/_compute.pyx:360:26: Cannot convert 'CDatum' to Python object

- python-cysignals

src/cysignals/signals.pyx:321:27: Cannot convert 'void *' to Python object

undeclared name not builtin: XXX (2 affected project)

- libarrow

pyarrow/_compute.pyx:337:32: undeclared name not builtin: maybe_unbox_memory_pool

- python-cysignals

src/cysignals/signals.pyx:310:4: undeclared name not builtin: sig_check

error: unknown file type '.pyx'/'.pxd' (2 affected project)

- python-compreffor

error: unknown file type '.pyx' (from 'src/cython/_compreffor.pyx')

- python-hidapi

error: unknown file type '.pxd' (from 'chid.pxd')

Rvalue-reference as function argument not supported (1 affected project)

- libarrow

pyarrow/includes/libarrow.pxd:1535:24: Rvalue-reference as function argument not supported

First base of 'ScalarUdfContext' is not an extension type (1 affected project)

- libarrow

pyarrow/_compute.pxd:24:28: First base of 'ScalarUdfContext' is not an extension type

Storing unsafe C derivative of temporary Python reference (1 affected project)

- libarrow

pyarrow/_compute.pyx:337:12: Storing unsafe C derivative of temporary Python reference

Casting temporary Python object to non-numeric non-Python type (1 affected project)

- libarrow

pyarrow/_compute.pyx:661:17: Casting temporary Python object to non-numeric non-Python type

Invalid operand type for '*' (Python object) (1 affected project)

- libarrow

pyarrow/_compute.pyx:2507:8: Invalid operand type for '*' (Python object)

Type is not specialized (1 affected project)

- mlpack

mpi4py/MPI/Datatype.pyx:851:50: Type is not specialized

Invalid types for '!=' (Python object, void *) (1 affected project)

- python-cysignals

src/cysignals/signals.pyx:368:24: Invalid types for '!=' (Python object, void *)

AttributeError: module 'collections' has no attribute 'MutableSequence' (1 affected project)

- python-djvulibre

AttributeError: module 'collections' has no attribute 'MutableSequence'

TypeError: Argument 'x' has incorrect type (expected float, got int) (1 affected project)

- python-ezdxf

TypeError: Argument 'x' has incorrect type (expected float, got int)

TypeError: can only concatenate tuple (not "ezdxf.acc.vector.Vec3") to tuple (1 affected project)

- python-ezdxf

TypeError: can only concatenate tuple (not "ezdxf.acc.vector.Vec3") to tuple

AttributeError: module 'asgi._cythonized' has no attribute 'TestResourceWithHooksNoHintAfter' (1 affected project)

- python-falcon

AttributeError: module 'asgi._cythonized' has no attribute 'TestResourceWithHooksNoHintAfter'

'PyObjectType' object has no attribute 'entry' (1 affected project)

- python-fastavro

AttributeError: 'PyObjectType' object has no attribute 'entry'

conflicting declaration of ‘bool evaluator_callback_call_obj(PyObject*, int, double*)’ with ‘C++’ linkage" (1 affected project)

- python-fpyll

build/src/fpylll/fplll/enumeration.cpp:2788:21: error: conflicting declaration of ‘bool evaluator_callback_call_obj(PyObject*, int, double*)’ with ‘C++’ linkage

Cannot assign None to bint (1 affected project)

- python-giacpy

src/gevent/greenlet.py:150:16: Cannot assign None to bint

'context_ptr' is not a constant, variable or function identifier (1 affected project)

- python-giacpy

giacpy/giacpy2qcas.pyx:16:40: 'context_ptr' is not a constant, variable or function identifier

AttributeError: partially initialized module 'gssapi' has no attribute 'register_value' (1 affected project)

- python-giacpy

AttributeError: partially initialized module 'gssapi' has no attribute 'register_value' (most likely due to a circular import)

AttributeError: module 'os' has no attribute 'XXX' (1 affected project)

- python-indexed_gzip

AttributeError: module 'os' has no attribute 'join'
AttributeError: module 'os' has no attribute 'isfile'
AttributeError: module 'os' has no attribute 'exists'
AttributeError: module 'os' has no attribute 'getsize'

TypeError: 'float' object cannot be interpreted as an integer (1 affected project)

- python-indexed_gzip

TypeError: 'float' object cannot be interpreted as an integer

Syntax error in simple statement list (1 affected project)

- python-pyclipper

pyclipper/pyclipper.pyx:20:14: Syntax error in simple statement list

Invalid index type 'double' (1 affected project)

- python-pysam

pysam/libcalignedsegment.pyx:570:35: Invalid index type 'double'

TypeError: expected str, bytes or os.PathLike object, not numpy_include (1 affected project)

- python-pyspike

TypeError: expected str, bytes or os.PathLike object, not numpy_include

AttributeError: cython_sources (1 affected project)

- PyYAML

AttributeError: cython_sources

error: redefinition of '__Pyx_Enum_ibv_wc_status_to_py' (1 affected project)

- rdma-core

/builddir/build/BUILD/rdma-core-44.0/redhat-linux-build/pyverbs/cq.c:20730:18: error: redefinition of '__Pyx_Enum_ibv_wc_status_to_py'

No such file or directory: 'editdistance-s/bycython.pyx' (1 affected project)

- python-editdistance

+ cythonize --inplace editdistance-s/bycython.pyx
/usr/bin/cythonize: No such file or directory: 'editdistance-s/bycython.pyx'
@da-woods
Copy link
Contributor

da-woods commented Mar 10, 2023

A few comments on some of the more obvious ones:

Cannot assign type 'XXX (YYY) except * nogil' to 'XXX (YYY) noexcept (20 affected projects)
Cannot assign type 'XXX (YYY) except? -1 nogil' to 'ZZZ *' (14 affected projects)

This is a fairly large deliberately breaking change. They likely need to add noexcept to some cdef function definitions.

Cannot assign type 'XXX' to 'YYY

A good chunk of these are "cannot assign double to " or in one case "complex to ". These are likely to do with the new cpow behaviour. Again, somewhat deliberately breaking, although we might want to look at individual cases. This can be fixed with cython: cpow = False (or @cython.cpow(False) for a more targeted fix).

The above is possibly true for some cases, but looking at one of the examples (https://github.com/Theano/libgpuarray/blob/9cec61435c11cf2ffcf7c480c2d524772585c47f/pygpu/collectives.pyx#L394) it's just that we use language_level_3 by default, so int/int now returns a float. That's on them to fix, but it'll be a case of specifying language_level=2

Pinned Cython < 3 version

That's on them!

undefined symbol PyMemoryview_Check

Fixed in current master

The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.

Should only be a warning for now

Invalid index type 'double'

Probably to do with cpow Python 3-style division (as above)


I guess the one thing to add is: it's legitimate for things to specify a version of Cython as part of their build process which doesn't have to be the system one. So not everyone necessarily needs to have to upgrade right now.

Thanks for the thorough list!

@da-woods
Copy link
Contributor

AttributeError: module 'collections' has no attribute 'MutableSequence'

#5308

@da-woods
Copy link
Contributor

TypeError: expected str, bytes or os.PathLike object, not numpy_include

I've created a PR for PySpike (mariomulansky/PySpike#68) - they're doing something slightly odd with paths and I don't think it's really on us to support it

@da-woods
Copy link
Contributor

I think most of the libarrow issues are because they have --warning-errors set. That's escalating a bunch of fairly trivial warnings into errors, and meaning that that a lot of cimports are failing because it's erroring on the pxd file. I doubt it'll be perfect, but it'll almost certainly look a lot better with that off (or with the warnings fixed)

@scoder
Copy link
Contributor

scoder commented Mar 11, 2023 via email

@thesamesam
Copy link

thesamesam commented Mar 14, 2023

We're tracking this in Gentoo at https://bugs.gentoo.org/897934 (see https://bugs.gentoo.org/showdependencytree.cgi?id=897934&hide_resolved=1 for a nice view) as well.

@scoder
Copy link
Contributor

scoder commented Mar 14, 2023

int/int now returns a float. That's on them to fix, but it'll be a case of specifying language_level=2

or using the // integer division operator.

@scoder
Copy link
Contributor

scoder commented May 26, 2023

Two months later, with Cython 3.0.0b3 out, and several projects providing updated code bases already, I think it's time to look into this again.

@hroncok and @hrnciar, would you be able to update the build results here?

@hroncok
Copy link
Contributor

hroncok commented May 26, 2023

Yes, however we are focusing on Python 3.12.0b1 at this moment. We can fire up the builds but won't have time to analyze the logs any time soon.

@hrnciar
Copy link
Contributor Author

hrnciar commented May 31, 2023

I have some numbers without looking into the logs.

Previously with Cython 3.0.0b1:

Out of 181 packages, 67 of them succeeded with legacy Cython 0.29.33 but failed with 3.0.0b1. 21 packages failed with both Cythons, those were ignored.

Now with Cython 3.0.0b3:

Out of 198 packages, 119 of them succeeded with Cython 3, and 65 of them succeeded with legacy Cython 0.29.34 but failed with 3.0.0b3. 14 packages failed with both Cythons, those were ignored.

If you are curious about the complete logs, each package name links to COPR build system where you can find it. E.g. scipy, to see a log, click on build ID and then choose builder-live.log.gz (choose the one in the table at the bottom, not the one that says Source build logs).

Cython 3.0.0b3 + all packages depending on it
https://copr.fedorainfracloud.org/coprs/thrnciar/Cython-3.0.0b3/packages/

Cython 0.29.34 + all packages that failed above (succeeded means failed with new Cython, but works with the old one, failed means failed with both Cythons, hence possibly some unrelated reason)
https://copr.fedorainfracloud.org/coprs/thrnciar/Cython-3.0.0b3-control/packages/

@matusvalo
Copy link
Contributor

I think that with Cython 3.0 released to prod we don't need to keep this issue opened. If someone disagrees feel free to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants