From the tp_dictoffset slot documentation:
"It is an error to set both the Py_TPFLAGS_MANAGED_WEAKREF bit and tp_dictoffset."
I think the Py_TPFLAGS_MANAGED_WEAKREF flag is being used incorrectly in this context. Do you mean the Py_TPFLAGS_MANAGED_DICT flag?
https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dictoffset
Linked PRs
From the
tp_dictoffsetslot documentation:I think the
Py_TPFLAGS_MANAGED_WEAKREFflag is being used incorrectly in this context. Do you mean thePy_TPFLAGS_MANAGED_DICTflag?https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dictoffset
Linked PRs
Py_TPFLAGS_MANAGED_DICT(gh-130044) #130059Py_TPFLAGS_MANAGED_DICT(gh-130044) #130060