gh-148498: Promote `PyUnstable_Object_GC_NewWithExtraData()` to the stable API by wjakob · Pull Request #148499 · python/cpython
Navigation Menu
{{ message }}
- Notifications You must be signed in to change notification settings
- Fork 34.4k
Open
wjakob wants to merge 1 commit intopython:mainfrom
Open
gh-148498: Promote PyUnstable_Object_GC_NewWithExtraData() to the stable API#148499
wjakob wants to merge 1 commit intopython:mainfrom
gh-148498: Promote PyUnstable_Object_GC_NewWithExtraData() to the stable API#148499
wjakob wants to merge 1 commit intopython:mainfrom
Conversation
Copy link Copy Markdown
Contributor
This commit renames PyUnstable_Object_GC_NewWithExtraData to PyObject_GC_NewWithExtraData() and adds it to the limited API.
📚 Documentation preview 📚: https://cpython-previews--148499.org.readthedocs.build/
… the stable API Rename ``PyUnstable_Object_GC_NewWithExtraData`` to ``PyObject_GC_NewWithExtraData`` and add it to the limited API.
wjakob
requested review from
a team,
ZeroIntensity and
encukou
as code owners
bedevere-app
bot
added
the
awaiting review
label
bedevere-app
bot
mentioned this pull request
wjakob
mentioned this pull request
5 tasks
Copy link Copy Markdown
Member
encukou
commented
Apr 13, 2026
encukou commented
Apr 13, 2026As the docs say:
The function is marked as unstable because the final mechanism for reserving extra data after an instance is not yet decided. For allocating a variable number of fields, prefer using PyVarObject and tp_itemsize instead.
This has not been resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment