Open davidhewitt opened 2 weeks ago
In Python 3.12 type flags were added to make the interpreter automatically handle __dict__ and weakrefs for classes: https://docs.python.org/3.12/c-api/typeobj.html#c.Py_TPFLAGS_MANAGED_DICT
__dict__
We should be able to switch to these instead of using out own dict_offset and weaklist_offset machinery. It's probably better for performance, and in the long run this would be a nice simplification to the codebase.
dict_offset
weaklist_offset
In Python 3.12 type flags were added to make the interpreter automatically handle
__dict__
and weakrefs for classes: https://docs.python.org/3.12/c-api/typeobj.html#c.Py_TPFLAGS_MANAGED_DICTWe should be able to switch to these instead of using out own
dict_offset
andweaklist_offset
machinery. It's probably better for performance, and in the long run this would be a nice simplification to the codebase.