-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Buffer protocol for inherited classes results in 'Internal error' #878
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
dean0x7d
added a commit
to dean0x7d/pybind11
that referenced
this issue
May 28, 2017
Thanks for the report and reproducible example. Your hunch was right about |
Cool, thanks; still surprised about the speed at which issues get addressed! :-) |
dean0x7d
added a commit
that referenced
this issue
May 29, 2017
rwgk
added a commit
to rwgk/pybind11
that referenced
this issue
Jul 20, 2021
…h (it was/is only needed for 1 test).
rwgk
added a commit
to rwgk/pybind11
that referenced
this issue
Jul 21, 2021
…h (it was/is only needed for 1 test).
rwgk
added a commit
to rwgk/pybind11
that referenced
this issue
Jul 22, 2021
…h (it was/is only needed for 1 test).
rwgk
added a commit
to rwgk/pybind11
that referenced
this issue
Jul 26, 2021
…h (it was/is only needed for 1 test).
rwgk
added a commit
to rwgk/pybind11
that referenced
this issue
Jul 26, 2021
…h (it was/is only needed for 1 test).
rwgk
added a commit
to rwgk/pybind11
that referenced
this issue
Jul 27, 2021
…h (it was/is only needed for 1 test).
rwgk
added a commit
that referenced
this issue
Jul 27, 2021
…ind11.h (#3135) * Fixing `pragma warning pop` for `__INTEL_COMPILER`. * Adding push/pop to 3 tests. Removing #878 from top of pybind11.h (it was/is only needed for 1 test). * Trying again after CI failure, moving the push to the top of 2 tests. * Trying more after CI failure, adding push/pop to pybind11_tests.h, constructor_stats.h. * Moving ICC #2196 suppression to CMakeLists.txt * Fixing condition for `pragma GCC diagnostic push` in pybind11.h * Moving `pragma warning disable 2196` to common.h * Revising #ifdef to be more conservative. * Undoing insertion of notes that will hopefully soon be completely obsolete anyway.
henryiii
pushed a commit
to henryiii/pybind11
that referenced
this issue
Jul 29, 2021
…ind11.h (pybind#3135) * Fixing `pragma warning pop` for `__INTEL_COMPILER`. * Adding push/pop to 3 tests. Removing pybind#878 from top of pybind11.h (it was/is only needed for 1 test). * Trying again after CI failure, moving the push to the top of 2 tests. * Trying more after CI failure, adding push/pop to pybind11_tests.h, constructor_stats.h. * Moving ICC pybind#2196 suppression to CMakeLists.txt * Fixing condition for `pragma GCC diagnostic push` in pybind11.h * Moving `pragma warning disable 2196` to common.h * Revising #ifdef to be more conservative. * Undoing insertion of notes that will hopefully soon be completely obsolete anyway.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When exposing a derived class that inherits from a base class that implements the buffer protocol, using this protocol fails.
Take for example an extended version of the code in the documentation:
Using this code results in the following:
As far as I can see, the problem is that Python knóws that the type implements the buffer protocol (because of the
bf_getbuffer
andbf_releasebuffer
fields), since these are part of the C API inheritance. But the pybind11 specifictinfo->get_buffer
does not get inherited from the parent class, resulting in the"generic_type::getbuffer(): Internal error"
exception.The text was updated successfully, but these errors were encountered: