Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Doc/glossary.rst Outdated
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 |
There was a problem hiding this comment.
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.
The lint CI is failing. |
3dbe02c
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Thanks@ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…tween versions (pythonGH-132352)(cherry picked from commit3dbe02c)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
…tween versions (pythonGH-132352)(cherry picked from commit3dbe02c)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
GH-136613 is a backport of this pull request to the3.14 branch. |
GH-136614 is a backport of this pull request to the3.13 branch. |
Uh oh!
There was an error while loading.Please reload this page.
I noticed that
Py_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