Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-132346: Docs: Clarify that reference counts aren't stable between versions#132352

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

ZeroIntensity
Copy link
Member

@ZeroIntensityZeroIntensity commentedApr 10, 2025
edited
Loading

I noticed thatPy_REFCNT andsys.getrefcount both document this already, but not the "reference count" glossary term.


📚 Documentation preview 📚:https://cpython-previews--132352.org.readthedocs.build/en/132352/glossary.html#term-reference-count

In :term:`CPython`, reference counts are not considered to be stable
or well-defined values; the number of references to an object, and how
that number is affected by Python code, may be different between
versions. Consequently, don't rely on an object's reference count to be
Copy link
Contributor

Choose a reason for hiding this comment

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

The last line is not true anymore with free-threading and interpreter skipping ref on temporaries, I suggest to remove the last line.

ZeroIntensity reacted with thumbs up emoji
@kumaraditya303
Copy link
Contributor

The lint CI is failing.

@ZeroIntensityZeroIntensity merged commit3dbe02c intopython:mainJul 13, 2025
30 checks passed
@github-project-automationgithub-project-automationbot moved this fromTodo toDone inDocs PRsJul 13, 2025
@ZeroIntensityZeroIntensity deleted the clarify-reference-count branchJuly 13, 2025 09:10
@ZeroIntensityZeroIntensity added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsJul 13, 2025
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 13, 2025
…tween versions (pythonGH-132352)(cherry picked from commit3dbe02c)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 13, 2025
…tween versions (pythonGH-132352)(cherry picked from commit3dbe02c)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@bedevere-app
Copy link

GH-136613 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJul 13, 2025
@bedevere-app
Copy link

GH-136614 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJul 13, 2025
ZeroIntensity added a commit that referenced this pull requestJul 13, 2025
…etween versions (GH-132352) (GH-136613)gh-132346: Docs: Clarify that reference counts aren't stable between versions (GH-132352)(cherry picked from commit3dbe02c)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
ZeroIntensity added a commit that referenced this pull requestJul 13, 2025
…etween versions (GH-132352) (GH-136614)gh-132346: Docs: Clarify that reference counts aren't stable between versions (GH-132352)(cherry picked from commit3dbe02c)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
picnixz pushed a commit to picnixz/cpython that referenced this pull requestJul 13, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@StanFromIrelandStanFromIrelandStanFromIreland left review comments

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

@vstinnervstinnerAwaiting requested review from vstinner

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip news
Projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ZeroIntensity@kumaraditya303@StanFromIreland

[8]ページ先頭

©2009-2025 Movatter.jp