Bug 2076584 - pybind11 fails to build with Python 3.11: ImportError: VanillaDictMix1: PyType_Ready failed (TypeError: mro() returned base with unsuitable layout ('pybind11_tests.multiple_inheritance.WithDict'))!
Summary: pybind11 fails to build with Python 3.11: ImportError: VanillaDictMix1: PyTyp...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pybind11
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-04-19 12:06 UTC by Tomáš Hrnčiar
Modified: 2022-06-22 11:49 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-22 11:49:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-04-19 12:06:15 UTC
pybind11 fails to build with Python 3.11.0a7.

ImportError while loading conftest '/builddir/build/BUILD/pybind11-2.9.2/tests/conftest.py'.
../../tests/conftest.py:19: in <module>
    import pybind11_tests  # noqa: F401
E   ImportError: VanillaDictMix1: PyType_Ready failed (TypeError: mro() returned base with unsuitable layout ('pybind11_tests.multiple_inheritance.WithDict'))!

This seems to be connected with this change in CPython:

The PyType_Ready() function now raises an error if a type is defined with the Py_TPFLAGS_HAVE_GC flag set but has no traverse function (PyTypeObject.tp_traverse). (Contributed by Victor Stinner in bpo-44263.)

https://bugs.python.org/issue?@action=redirect&bpo=44263
https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/04221007-pybind11/

For all our attempts to build pybind11 with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/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.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Susi Lehtola 2022-04-19 18:20:33 UTC
I don't have the time nor the expertise to work on this. If anyone is willing to take pybind11 off my hands, please tell me.

Comment 2 Miro Hrončok 2022-04-19 18:48:32 UTC
CCing some people who might be interested in taking over pybind11.

pybind11 is needed for scipy, opae, and zxing-cpp in ELN.


In Rawhide, it is needed for more:

$ repoquery -q --repo=rawhide{,-source} --whatrequires pybind11-devel --whatrequires python3-pybind11
OpenColorIO-0:2.1.1-3.fc37.src
OpenImageIO-0:2.3.14.0-1.fc37.src
android-file-transfer-0:4.2-4.fc36.src
arbor-0:0.5.2-4.fc36.src
dolfin-0:2019.1.0.post0-30.fc36.src
gnuradio-0:3.10.2.0-1.fc37.src
gr-air-modes-0:0-0.93.20200807git9e2515a5.fc37.src
gr-funcube-0:1.0.0-12.20220130gitbf71b979.fc37.src
gr-hpsdr-0:3.0-12.fc37.src
gr-iqbal-0:0.38.2-13.20210210gitfbee239a.fc37.src
gr-osmosdr-0:0.2.3-22.20210217gita100eb02.fc37.src
gr-rds-0:1.1.0-30.20220127git51acc5bd.fc37.src
libsonata-0:0.1.11-6.fc37.src
morphio-0:3.3.3-1.fc37.src
netgen-mesher-0:6.2.2202-1.fc37.src
oneVPL-0:2022.1.0-1.fc37.src
opae-0:2.0.0-2.8.fc36.src
openshadinglanguage-0:1.11.16.0-3.fc36.src
orocos-kdl-0:1.5.1-1.fc37.src
psi4-1:1.3.2-13.fc35.src
pyosmium-0:3.3.0-1.fc37.src
python-ducc0-0:0.23.0-1.fc37.src
python-mapbox-earcut-0:1.0.0-1.fc36.src
python-mplcairo-0:0.4-4.fc36.src
python-pikepdf-0:5.1.0-1.fc37.src
python-pyopencl-0:2022.1-1.fc37.src
python3-dolfin-0:2019.1.0.post0-30.fc36.x86_64
python3-pybind11-0:2.9.2-1.fc37.x86_64
scipy-0:1.8.0-3.fc37.src
smoldyn-0:2.66.1-2.fc36.src
xcfun-0:2.1.1-5.fc36.src
xtensor-python-0:0.24.1-5.fc36.src
xtensor-python-devel-0:0.24.1-5.fc36.i686
xtensor-python-devel-0:0.24.1-5.fc36.x86_64
zxing-cpp-0:1.2.0-3.fc36.src

Comment 3 Miro Hrončok 2022-06-22 11:49:14 UTC
Closing this in bulk as it built with Python 3.11. If this needs to remain open for a followup, feel free to reopen, I won't close in bulk again.


Note You need to log in before you can comment on or make changes to this bug.