bpo-41984: GC track all user classes#22701
Conversation
There was a problem hiding this comment.
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: |
| @@ -0,0 +1,2 @@ | |||
| The garbage collector now tracks all user-defined classes. Patch by Brandt | |||
There was a problem hiding this comment.
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.
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