python-cffi fails to build with Python 3.13.0a1. src/c/misc_thread_common.h:335:12: error: implicit declaration of function _PyThreadState_UncheckedGet; did you mean PyThreadState_GetUnchecked? [-Werror=implicit-function-declaration] 335 | return _PyThreadState_UncheckedGet(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | PyThreadState_GetUnchecked src/c/_cffi_backend.c:137:24: error: implicit declaration of function _PyUnicode_AsString; did you mean PyUnicode_Substring? [-Werror=implicit-function-declaration] 137 | # define PyText_AsUTF8 _PyUnicode_AsString /* PyUnicode_AsUTF8 in Py3.3 */ | ^~~~~~~~~~~~~~~~~~~ src/c/_cffi_backend.c:868:17: error: implicit declaration of function _PyLong_Sign [-Werror=implicit-function-declaration] 868 | if (_PyLong_Sign(ob) < 0) | ^~~~~~~~~~~~ src/c/_cffi_backend.c:2449:12: error: implicit declaration of function _Py_HashPointer [-Werror=implicit-function-declaration] 2449 | return _Py_HashPointer(((CDataObject *)v)->c_data); | ^~~~~~~~~~~~~~~ src/c/_cffi_backend.c:6121:9: error: implicit declaration of function _PyErr_WriteUnraisable; did you mean PyErr_WriteUnraisable? [-Werror=implicit-function-declaration] 6121 | _PyErr_WriteUnraisableMsg(PyText_AS_UTF8(s), NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | PyErr_WriteUnraisable According to https://docs.python.org/3.13/whatsnew/3.13.html: - Python.h no longer includes the <ctype.h> standard header file. If needed, it should now be included explicitly. For example, it provides isalpha() and tolower() functions which are locale dependent. Python provides locale independent functions, like Py_ISALPHA() and Py_TOLOWER(). (Contributed by Victor Stinner in gh-108765.) - There have been many changes to the C API, see details in: https://docs.python.org/3.13/whatsnew/3.13.html - The detailed list of the removed private C API functions can be found here: https://github.com/python/cpython/issues/106320 For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06551047-python-cffi/ For all our attempts to build python-cffi with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-cffi/ 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.13: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/ Let us know here if you have any questions. Python 3.13 is planned to be included in Fedora 41. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13. 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.
https://github.com/python-cffi/cffi/issues/23 https://github.com/python-cffi/cffi/pull/24 The WIP upstream fix still does not work with -Werror=implicit-function-declaration but nevertheless the tests pass. I'll hack that up in the @python/python3.13 copr to unblock things. Hopefully, we'll get a better fix later.
Building the package in Copr with: Patch: https://github.com/python-cffi/cffi/pull/24.patch %global build_type_safety_c 0
Witch recent changes in Python 3.13, https://github.com/python-cffi/cffi/pull/34 should be enough: https://src.fedoraproject.org/rpms/python-cffi/pull-request/23