boost fails to build with Python 3.10.0a4. libs/python/src/exec.cpp:109:14: error: '_Py_fopen' was not declared in this scope; did you mean '_Py_wfopen'? 109 | FILE *fs = _Py_fopen(f, "r"); | ^~~~~~~~~ | _Py_wfopen bpo-32381: Remove the private _Py_fopen() function which is no longer needed. Use _Py_wfopen() or _Py_fopen_obj() instead. https://docs.python.org/3.10/whatsnew/changelog.html#c-api For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01859489-boost/ For all our attempts to build boost with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/boost/ 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.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. 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.
*** Bug 1912917 has been marked as a duplicate of this bug. ***
Third party projects should not rely on the private C API: functions starting with "_Py". Boost can use fopen() instead. If Boost needs a C API for https://www.python.org/dev/peps/pep-0446/ it should be requested and it would be a new Python feature. For curious people, see https://bugs.python.org/issue32381 for the rationale of _Py_fopen() removal. In short, using bytes strings for filenames is causing encoding issues. Python now uses wide character strings instead internally: _Py_wfopen().
I proposed https://github.com/boostorg/python/pull/344 to fix boost-python.
> I proposed https://github.com/boostorg/python/pull/344 to fix boost-python. Merged: https://github.com/boostorg/python/commit/cbd2d9f033c61d29d0a1df14951f4ec91e7d05cd
https://src.fedoraproject.org/rpms/boost/pull-request/8
Oh, it's good to see it fixed ;-)