Skip to content

gh-148498: Promote PyUnstable_Object_GC_NewWithExtraData() to the stable API#148499

Open
wjakob wants to merge 1 commit intopython:mainfrom
wjakob:variable-objects
Open

gh-148498: Promote PyUnstable_Object_GC_NewWithExtraData() to the stable API#148499
wjakob wants to merge 1 commit intopython:mainfrom
wjakob:variable-objects

Conversation

@wjakob
Copy link
Copy Markdown
Contributor

@wjakob wjakob commented Apr 13, 2026

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.
@encukou
Copy link
Copy Markdown
Member

encukou commented Apr 13, 2026

As 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants