python-gmpy2 fails to build with Python 3.13.0a1. In file included from src/gmpy2.c:605: src/gmpy2_convert_gmp.c: In function ‘GMPy_PyLong_From_MPZ’: src/gmpy2_convert_gmp.c:174:20: error: implicit declaration of function ‘_PyLong_New’ [-Werror=implicit-function-declaration] 174 | if (!(result = _PyLong_New(size))) { | ^~~~~~~~~~~ In file included from src/gmpy2.c:648: src/gmpy2_hash.c: In function ‘_mpfr_hash’: src/gmpy2_hash.c:189:12: error: implicit declaration of function ‘_Py_HashDouble’ [-Werror=implicit-function-declaration] 189 | return _Py_HashDouble(temp); | ^~~~~~~~~~~~~~ This function has been removed from Python 3.13. The detailed list of the removed private C API functions can be found here: https://github.com/python/cpython/issues/106320 https://docs.python.org/3.13/whatsnew/3.13.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06551072-python-gmpy2/ For all our attempts to build python-gmpy2 with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-gmpy2/ 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.
Gmpy2 upstream has requested information on: - a _PyLong_New replacement: https://github.com/python/cpython/pull/108604 - a _Py_HashDouble replacement: https://github.com/python/cpython/pull/107026
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40.
Upstream kept the needed interfaces for python 3.13, so I am closing this bug for now. The problem will resurface with python 3.14, but gmpy2 upstream is working with python upstream to craft a solution.