pybind11 fails to build with Python 3.12.0a7. =================================== FAILURES =================================== ___________________ test_flaky_exception_failure_point_init ____________________ @pytest.mark.skipif("env.PYPY", reason="PyErr_NormalizeException Segmentation fault") def test_flaky_exception_failure_point_init(): > with pytest.raises(RuntimeError) as excinfo: E Failed: DID NOT RAISE <class 'RuntimeError'> excinfo = <ExceptionInfo for raises contextmanager> ../../tests/test_exceptions.py:323: Failed ________________________________ test_importing ________________________________ def test_importing(): from collections import OrderedDict from pybind11_tests.modules import OD assert OD is OrderedDict > assert str(OD([(1, "a"), (2, "b")])) == "OrderedDict([(1, 'a'), (2, 'b')])" E assert "OrderedDict(...'a', 2: 'b'})" == "OrderedDict(...), (2, 'b')])" E - OrderedDict([(1, 'a'), (2, 'b')]) E ? ^^ ^ - - ^ -- E + OrderedDict({1: 'a', 2: 'b'}) E ? ^ ^ ^ + OD = <class 'collections.OrderedDict'> OrderedDict = <class 'collections.OrderedDict'> ../../tests/test_modules.py:64: AssertionError =========================== short test summary info ============================ SKIPPED [1] ../../tests/test_callbacks.py:203: Current PYBIND11_INTERNALS_VERSION too low SKIPPED [1] ../../tests/test_stl.py:143: no <experimental/optional> SKIPPED [1] ../../tests/test_stl.py:175: no <boost/optional> FAILED ../../tests/test_exceptions.py::test_flaky_exception_failure_point_init FAILED ../../tests/test_modules.py::test_importing - assert "OrderedDict(...'... ================== 2 failed, 788 passed, 3 skipped in 20.71s =================== There is this upstream commit I've tried to backport, but the failure remains the same. https://github.com/pybind/pybind11/commit/654fe92652e6dc0eec80b1877b531aaab3a3e56c https://docs.python.org/3.12/whatsnew/3.12.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05846339-pybind11/ For all our attempts to build pybind11 with Python 3.12, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/pybind11/ 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.12: https://copr.fedorainfracloud.org/coprs/g/python/python3.12/ Let us know here if you have any questions. Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12. 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.
This commit fixes the latter test failure. https://github.com/pybind/pybind11/commit/442261da585536521ff459b1457b2904895f23b4
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.