cryptlib fails to build with Python 3.13.0a1. python.c: In function ‘getPointerWrite’: python.c:23:9: error: implicit declaration of function ‘PyObject_AsWriteBuffer’; did you mean ‘PyObject_GetBuffer’? [-Werror=implicit-function-declaration] 23 | if (PyObject_AsWriteBuffer(objPtr, (void **)bytesPtrPtr, &size) == -1) | ^~~~~~~~~~~~~~~~~~~~~~ | PyObject_GetBuffer python.c: In function ‘getPointerRead’: python.c:47:13: error: implicit declaration of function ‘PyObject_AsCharBuffer’; did you mean ‘PyObject_CheckBuffer’? [-Werror=implicit-function-declaration] 47 | if (PyObject_AsCharBuffer(objPtr, (const char **)bytesPtrPtr, &size) == -1) | ^~~~~~~~~~~~~~~~~~~~~ | PyObject_CheckBuffer 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/06546751-cryptlib/ For all our attempts to build cryptlib with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/cryptlib/ 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.
I have updated the source code to Cryptlib version 3.4.7-1 in RAWHIDE. The source code of python.c is now based entirely on the new Buffer Protocol using PyObject_GetBuffer() only. The offending old wrapper functions PyObject_AsWriteBuffer() and PyObject_AsCharBuffer() are deleted everywhere. All my tests of python code that uses the new Cryptlib python library show that the changed code is fully functional. A new Cryptlib version has been build for RAWHIDE : https://bodhi.fedoraproject.org/updates/FEDORA-2023-5c1e41b85c Please check if the 3.4.7-1 build in RAWHIDE builds with Python 3.13.0a1 in copr and if so, please close this bug. Thanks.
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/build/6588246