Skip to content

Docs: Fix and improve the PyUnstable_Object_EnableDeferredRefcount documentation #135323

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2025

Conversation

ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Jun 10, 2025

  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

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 <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 13, 2025

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
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 <[email protected]>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
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