-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
GH-95707: Fix uses of Py_TPFLAGS_MANAGED_DICT
#95854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_DICT
to be directly used in builtin classes.int
) can now used managed dictionariestp_dictoffset
, by settingtp_dictoffset
to -1 ifPy_TPFLAGS_MANAGED_DICT
is 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.