Skip to content

gh-98154: Clarify Usage of "Reference Count" In the Docs#107552

Merged
ericsnowcurrently merged 15 commits intopython:mainfrom
ericsnowcurrently:docs-refcounts
Aug 7, 2023
Merged

gh-98154: Clarify Usage of "Reference Count" In the Docs#107552
ericsnowcurrently merged 15 commits intopython:mainfrom
ericsnowcurrently:docs-refcounts

Conversation

@ericsnowcurrently
Copy link
Copy Markdown
Member

@ericsnowcurrently ericsnowcurrently commented Aug 1, 2023

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts. In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective. It also updates the docs relative to immortal objects in a handful of places.

(This should also be backported to 3.10 and 3.11, minus 3.12-specific details.)


📚 Documentation preview 📚: https://cpython-previews--107552.org.readthedocs.build/

Copy link
Copy Markdown
Contributor

@kumaraditya303 kumaraditya303 left a comment

Choose a reason for hiding this comment

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

LGTM

@miss-islington
Copy link
Copy Markdown
Contributor

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

@ericsnowcurrently ericsnowcurrently deleted the docs-refcounts branch August 7, 2023 21:41
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 7, 2023
…ngh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
(cherry picked from commit 5dc825d)

Co-authored-by: Eric Snow <[email protected]>
@bedevere-bot
Copy link
Copy Markdown

GH-107752 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 7, 2023
Yhg1s pushed a commit that referenced this pull request Aug 8, 2023
…07552) (#107752)

* gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
(cherry picked from commit 5dc825d)

Co-authored-by: Eric Snow <[email protected]>

* Fix a typo.

---------

Co-authored-by: Eric Snow <[email protected]>
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.

4 participants