You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Binding of deeper (>= 2 levels) class hierarchies that inherit from
a trampoline class fail in Python 3.12+. For example, in the added test
suite class ``SiameseCat``, this produces the following error message:
Critical nanobind error: nanobind::detail::nb_type_new("SiameseCat"): type construction failed: TypeError: tp_basicsize for type 'test_classes_ext.SiameseCat' (56) is too small for base 'test_classes_ext.Cat' (88)!
The trick to make Python happy is to carefully walk through the parent
classes to look for trampolines. Previously, only the direct parent was
checked.
0 commit comments