Skip to content

bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() #29246

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

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
@colesbury colesbury added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Oct 27, 2021
@ambv ambv merged commit 35e1ff3 into python:main Oct 27, 2021
@miss-islington
Copy link
Contributor

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

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 <[email protected]>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Oct 27, 2021
colesbury referenced this pull request in colesbury/nogil Oct 27, 2021
…Track() (GH-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 <[email protected]>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Oct 27, 2021
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 <[email protected]>
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 <[email protected]>
@colesbury colesbury deleted the docs-gc-untrack branch November 18, 2021 19:16
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.

5 participants