-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Support the use of the managed pre-header in builtin classes. #95707
Comments
* Make sure that tp_dictoffset is correct with Py_TPFLAGS_MANAGED_DICT is set. * Avoid traversing managed dict twice when subclassing class with Py_TPFLAGS_MANAGED_DICT set.
The changeset broke wasm32-emscripten builds.
|
The clear function signature is incorrect. The PR defines it as I'm also getting warnings on X86_64:
|
Ping @markshannon -- this still is not documented (there are some mentions of the flags but no explanations or documentation for the upgrade path). This came up in GH-104795. |
@gvanrossum, see also #107073. Seems like |
It’s public enough unless Victor moves it. :-) |
Yes, it's included in |
We can't change 3.12 so please document it. And feelings around leading |
Currently
Py_TPFLAGS_MANAGED_DICT
is an internal-only flag, in fact setting in third-party code is likely to lead to a crash.We would like to expose it, and a weakref equivalent
Py_TPFLAGS_MANAGED_WEAKREFS
to allow builtin classes to take advantage of compact object layout.Compact layout uses less memory, performs better and allow more robust subclassing. So everyone should be able to use it.
Py_TPFLAGS_MANAGED_DICT
is usedPy_TPFLAGS_MANAGED_WEAKREFS
tp_dictoffset
andtp_weakreflist
The text was updated successfully, but these errors were encountered: