Bug 2245851

Summary: python-crypto fails to build with Python 3.13: error: implicit declaration of function ‘_PyLong_New’
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-cryptoAssignee: Paul Howarth <paul>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, mhroncok, paul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-crypto-2.6.1-48.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-10-28 16:28:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2244836    

Description Karolina Surma 2023-10-24 11:17:01 UTC
python-crypto fails to build with Python 3.13.0a1.

src/_fastmath.c:146:27: error: implicit declaration of function ‘_PyLong_New’ [-Werror=implicit-function-declaration]
  146 |         PyLongObject *l = _PyLong_New (size);
      |                           ^~~~~~~~~~~

https://docs.python.org/3.13/whatsnew/3.13.html

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06546771-python-crypto/

For all our attempts to build python-crypto with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-crypto/

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.

Comment 1 Fedora Update System 2023-10-28 14:59:39 UTC
FEDORA-2023-0f017a0985 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0f017a0985

Comment 2 Fedora Update System 2023-10-28 16:28:12 UTC
FEDORA-2023-0f017a0985 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.