gh-148498: Promote `PyUnstable_Object_GC_NewWithExtraData()` to the stable API by wjakob · Pull Request #148499 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@wjakob

Copy link Copy Markdown

Contributor

@wjakob wjakob commented

Apr 13, 2026

edited by github-actions bot

Loading

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

Reviewers

@encukou encukou Awaiting requested review from encukou encukou is a code owner

@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@wjakob @encukou