Cython fails to build with Python 3.11.0a4. /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c: In function ‘__Pyx_PyErr_GetTopmostException’: /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19461:21: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’ 19461 | while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19461:51: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’ 19461 | while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c: In function ‘__Pyx__ExceptionSave’: /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19475:21: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’ 19475 | *type = exc_info->exc_type; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19477:19: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’ 19477 | *tb = exc_info->exc_traceback; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c: In function ‘__Pyx__ExceptionReset’: /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19491:24: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’ 19491 | tmp_type = exc_info->exc_type; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19493:22: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’ 19493 | tmp_tb = exc_info->exc_traceback; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19494:13: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’ 19494 | exc_info->exc_type = type; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19496:13: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’ 19496 | exc_info->exc_traceback = tb; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c: In function ‘__Pyx__GetException’: /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19578:28: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’ 19578 | tmp_type = exc_info->exc_type; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19580:26: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’ 19580 | tmp_tb = exc_info->exc_traceback; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19581:17: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_type’ 19581 | exc_info->exc_type = local_type; | ^~ /builddir/build/BUILD/cython-0.29.26/Cython/Compiler/Scanning.c:19583:17: error: ‘_PyErr_StackItem’ {aka ‘struct _err_stackitem’} has no member named ‘exc_traceback’ 19583 | exc_info->exc_traceback = local_tb; The interpreter state’s representation of handled exceptions (a.k.a exc_info, or _PyErr_StackItem) now has only the exc_value field, exc_type and exc_traceback have been removed as their values can be derived from exc_value. (Contributed by Irit Katriel in bpo-45711.) https://bugs.python.org/issue45711 https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03197418-Cython/ For all our attempts to build Cython with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/Cython/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
See also: https://github.com/cython/cython/issues/4500#issuecomment-1026949365 https://github.com/cython/cython/pull/4610
Cython in COPR was built with those two patches, but it's apparently not enough because some packages still don't build with it. I'll try to temporarily build Cython 3.0.0a10 to unblock other packages in COPR until 0.29.x branch is fixed.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
Closing this in bulk as it built with Python 3.11. If this needs to remain open for a followup, feel free to reopen, I won't close in bulk again.