Repository navigation
GH-95707: Fix uses of Py_TPFLAGS_MANAGED_DICT - #95854
Conversation
…FLAGS_MANAGED_DICT set.
…1 if using managed dicts. Allows use of managed dict on subclasses of variable sized objects like tuple.
ericsnowcurrently
left a comment
There was a problem hiding this comment.
LGTM
I've left some comments to get clarification, but none of them should hold this up unless you think we've missed something.
|
|
|
|
Py_TPFLAGS_MANAGED_DICTto be directly used in builtin classes.int) can now used managed dictionariestp_dictoffset, by settingtp_dictoffsetto -1 ifPy_TPFLAGS_MANAGED_DICTis set.The downside is that C extensions that perform their own version of
_PyObject_GetDictPtr()are even more broken than they were in 3.11. Hopefully no one is doing this anymore.