Open
Description
For python-3.12+ one could use Py_TPFLAGS_MANAGED_DICT instead of dict (and similar for weakref), for memory/speed improvements in SwigPyObject used by the builtin wrappers. (from #3196). Currently we use https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dictoffset.
As documented in the links above, this will require also require using Py_TPFLAGS_HAVE_GC. To be researched: side effects and consequences of turning on garbage collection for builtin types.
476E
div>