-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Broken mro when using multiple inheritance with py::metaclass #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is on Python 3.5.2. |
I will also say that the need to add |
While I agree with it being a nuisance, this was already ruled upon by the lead developer. |
When a derived class
MroDerived
needs to expose a static attribute (which necessitates usingpy::metaclass
), but also inherits from multiple bases Python raises the following error:ImportError: MroDerived: PyType_Ready failed (TypeError: mro() returned base with unsuitable layout ('pybind11_tests.MroBaseB'))!
For a complete example see https://github.com/lsst-dm/pybind11/tree/broken_mro
The text was updated successfully, but these errors were encountered: