-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
docs(easy): Document that heap types need to support garbage collection #116935
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
Comments
I think this is true when a heap type is created by |
I'd be happy to open a PR to update the docs but wanted to make sure I understand the comment above. @neonene Are you suggesting that heap types wouldn't have this requirement if |
As long as not a few heap types work in Python without |
…lection (pythonGH-118021) (cherry picked from commit 5d54436) Co-authored-by: Savannah Ostrowski <[email protected]>
Documentation
In https://docs.python.org/3/c-api/typeobj.html#c.Py_TPFLAGS_HEAPTYPE, it does not mention that the heap type must support GC. However this is actually the case. The type itself needs to be visited by the GC because it forms a reference cycle with its own module object. We should document this.
Linked PRs
The text was updated successfully, but these errors were encountered: