Skip to content

Docs: Fix and improve the PyUnstable_Object_EnableDeferredRefcount documentation#135323

Merged
ZeroIntensity merged 2 commits into
python:mainfrom
ZeroIntensity:fix-drc-doc
Jul 13, 2025
Merged

Docs: Fix and improve the PyUnstable_Object_EnableDeferredRefcount documentation#135323
ZeroIntensity merged 2 commits into
python:mainfrom
ZeroIntensity:fix-drc-doc

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Jun 10, 2025

Copy link
Copy Markdown
Member
  1. Clarify that the object isn't immediately deallocated when the interpreter is done with it.
  2. Fix the documented return value; it's documented as returning 1 when DRC is already enabled, but it actually returns 0.
  3. Mention the tp_new slot, where it should generally be used.

📚 Documentation preview 📚: https://cpython-previews--135323.org.readthedocs.build/en/135323/c-api/object.html#c.PyUnstable_Object_EnableDeferredRefcount

@ZeroIntensity ZeroIntensity merged commit 0d4fd10 into python:main Jul 13, 2025
41 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jul 13, 2025
@miss-islington-app

Copy link
Copy Markdown

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

@ZeroIntensity ZeroIntensity deleted the fix-drc-doc branch July 13, 2025 06:46
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 13, 2025
…documentation (pythonGH-135323)

(cherry picked from commit 0d4fd10)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@bedevere-app

bedevere-app Bot commented Jul 13, 2025

Copy link
Copy Markdown

GH-136610 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 Jul 13, 2025
@ZeroIntensity

Copy link
Copy Markdown
Member Author

Thanks for the review!

ZeroIntensity added a commit that referenced this pull request Jul 13, 2025
…count` documentation (GH-135323) (GH-136610)

Docs: Fix and improve the `PyUnstable_Object_EnableDeferredRefcount` documentation (GH-135323)
(cherry picked from commit 0d4fd10)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
…count` documentation (pythonGH-135323) (pythonGH-136610)

Docs: Fix and improve the `PyUnstable_Object_EnableDeferredRefcount` documentation (pythonGH-135323)
(cherry picked from commit 0d4fd10)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants