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");
bpo-32381: Remove the private _Py_fopen() function which is no longer needed. Use _Py_wfopen() or _Py_fopen_obj() instead.
For the build logs, see:
For all our attempts to build boost with Python 3.10, see:
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:
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.
Oh, it's good to see it fixed ;-)