Skip to content
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-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() #29246

Merged
merged 1 commit into from Oct 27, 2021

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Oct 27, 2021

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.

https://bugs.python.org/issue28737

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Oct 27, 2021
@ambv ambv added the skip news label Oct 27, 2021
@ambv ambv merged commit 35e1ff3 into python:main Oct 27, 2021
12 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Oct 27, 2021

Thanks @colesbury for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Oct 27, 2021

Sorry @colesbury and @ambv, I had trouble checking out the 3.10 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 35e1ff38ee67ee543d9fcb268c3552c5397f9b3f 3.10

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 27, 2021
…pythonGH-29246)

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.
(cherry picked from commit 35e1ff3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-bot
Copy link

bedevere-bot commented Oct 27, 2021

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

colesbury added a commit to colesbury/nogil that referenced this pull request Oct 27, 2021
…Track() (pythonGH-29246)

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.
(cherry picked from commit 35e1ff3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-bot
Copy link

bedevere-bot commented Oct 27, 2021

GH-29249 is a backport of this pull request to the 3.10 branch.

ambv pushed a commit that referenced this pull request Oct 28, 2021
…Track() (GH-29246) (GH-29249)

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.
(cherry picked from commit 35e1ff3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
ambv pushed a commit that referenced this pull request Oct 28, 2021
…GH-29246) (GH-29248)

Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.
(cherry picked from commit 35e1ff3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@colesbury colesbury deleted the docs-gc-untrack branch Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants