Repro:
from object_database import Schema
subclass_schema = Schema("test_subclassing")
@subclass_schema.define
class BaseClass:
x = int
@subclass_schema.define
class DerivedClass(BaseClass):
y = int
assert issubclass(DerivedClass, BaseClass)
This is due to __bases__ and __mro__ not being set properly when the object is created in the define method of schema.py. Options:
- Implement tp_base in the C
- Generate a new set_bases() method on the object t that is called during the initialisation process.
Repro:
This is due to
__bases__and__mro__not being set properly when the object is created in the define method of schema.py. Options: