Skip to content

gh-159730: Warn that gc.get_objects() can expose objects under construction - #159731

Merged
ngoldbaum merged 1 commit into
python:mainfrom
ngoldbaum:get-objects-warning
Oct 19, 2026
Merged

ngoldbaum merged 1 commit into
python:mainfrom
ngoldbaum:get-objects-warning

Conversation

@ngoldbaum

@ngoldbaum ngoldbaum commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

I spoke with @vstinner about this at the core dev sprint and he agrees this is worth adding.

This is the same text as the warning currently in the gc.get_referrers() docs.

@ngoldbaum ngoldbaum added the docs Documentation in the Doc dir label Oct 19, 2026
@ngoldbaum
ngoldbaum requested a review from pablogsal as a code owner October 19, 2026 18:46
@ngoldbaum ngoldbaum added skip news 3.14 bugs and security fixes 3.15 bugs and security fixes labels Oct 19, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Oct 19, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35250304 | 📁 Comparing 1f6eff3 against main (415ebff)

  🔍 Preview build  

1 file changed
± library/gc.html

@corona10 corona10 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.

Yeah let's not fix the #152288 as Kumar commented.

@ngoldbaum
ngoldbaum merged commit 42c7e26 into python:main Oct 19, 2026
44 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 19, 2026
@ZeroIntensity

Copy link
Copy Markdown
Member

Did you want this backported?

@ngoldbaum ngoldbaum added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes and removed 3.14 bugs and security fixes 3.15 bugs and security fixes labels Oct 19, 2026
@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Oct 19, 2026

Copy link
Copy Markdown

GH-159737 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 19, 2026
@ngoldbaum

Copy link
Copy Markdown
Contributor Author

I applied the wrong labels earlier 🙃

@bedevere-app

bedevere-app Bot commented Oct 19, 2026

Copy link
Copy Markdown

GH-159738 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 19, 2026
ngoldbaum added a commit that referenced this pull request Oct 19, 2026
… construction (GH-159731) (#159737)

gh-159730: Warn that gc.get_objects() can expose objects under construction (GH-159731)
(cherry picked from commit 42c7e26)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
ngoldbaum added a commit that referenced this pull request Oct 19, 2026
… construction (GH-159731) (#159738)

gh-159730: Warn that gc.get_objects() can expose objects under construction (GH-159731)
(cherry picked from commit 42c7e26)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
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

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants