-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-41984: GC track all user classes #22701
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
bpo-41984: GC track all user classes #22701
Conversation
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!
Thanks, @brandtbucher! I left two small suggestion, but feel free to merge it :)
Also, congrats on your first merge 🎉
P.S. Remember to change #22701 to GH-22701 in the commit message :)
return PyErr_Format(PyExc_TypeError, "heap type expected, got %R", obj); | ||
} | ||
if (PyType_IS_GC(tp)) { | ||
// Don't try this at home, kids: |
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.
:)
@@ -0,0 +1,2 @@ | |||
The garbage collector now tracks all user-defined classes. Patch by Brandt |
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.
I doubt that people are relying on the past behaviour (but I have been surprised in the past) so I am questioning if we should include a small sentence in the What's new of 3.10 in the "porting" section. What do you think?
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.
Maybe? I don't really feel the need to, though, since the behavior wasn't documented before and we don't provide any "fixes" to actually port old code.
Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
(cherry picked from commit c13b847) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
GH-22702 is a backport of this pull request to the 3.9 branch. |
(cherry picked from commit c13b847) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
GH-22703 is a backport of this pull request to the 3.8 branch. |
Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit c13b847) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
GH-22707 is a backport of this pull request to the 3.8 branch. |
I still haven't performed a merge since getting the commit bit, so I'd like to do this one myself.
https://bugs.python.org/issue41984