-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
Doc: C API: Delete claim that PyObject_Init
is GC-aware
#126418
Conversation
As far as I can tell, `PyObject_Init` never tells the garbage collector about the memory even if the `Py_TPFLAGS_HAVE_GC` flag is set.
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.
Good catch! This is an old remnant of Python 2, and hasn't been true for uh... 23 years.
Thanks @rhansen for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
GH-126431 is a backport of this pull request to the 3.13 branch. |
GH-126432 is a backport of this pull request to the 3.12 branch. |
As far as I can tell,
PyObject_Init
never tells the garbage collector about the memory even if thePy_TPFLAGS_HAVE_GC
flag is set.📚 Documentation preview 📚: https://cpython-previews--126418.org.readthedocs.build/