Skip to content

bpo-41984: GC track all user classes#22701

Merged
brandtbucher merged 9 commits into
python:masterfrom
brandtbucher:track-all-heap-types
Oct 15, 2020
Merged

bpo-41984: GC track all user classes#22701
brandtbucher merged 9 commits into
python:masterfrom
brandtbucher:track-all-heap-types

Conversation

@brandtbucher

@brandtbucher brandtbucher commented Oct 14, 2020

Copy link
Copy Markdown
Member

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

@pablogsal pablogsal left a comment

Copy link
Copy Markdown
Member

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 :)

Comment thread Modules/_testcapimodule.c
return PyErr_Format(PyExc_TypeError, "heap type expected, got %R", obj);
}
if (PyType_IS_GC(tp)) {
// Don't try this at home, kids:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

Comment thread Modules/_testcapimodule.c
@@ -0,0 +1,2 @@
The garbage collector now tracks all user-defined classes. Patch by Brandt

Copy link
Copy Markdown
Member

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?

@brandtbucher brandtbucher Oct 15, 2020

Copy link
Copy Markdown
Member Author

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.

@brandtbucher
brandtbucher merged commit c13b847 into python:master Oct 15, 2020
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2020
(cherry picked from commit c13b847)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-22702 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2020
(cherry picked from commit c13b847)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-22703 is a backport of this pull request to the 3.8 branch.

brandtbucher pushed a commit that referenced this pull request Oct 15, 2020
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2020
(cherry picked from commit c13b847)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-22707 is a backport of this pull request to the 3.8 branch.

brandtbucher pushed a commit that referenced this pull request Oct 15, 2020
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@brandtbucher
brandtbucher deleted the track-all-heap-types branch July 21, 2022 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants