Skip to content

gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases#151252

Open
encukou wants to merge 6 commits into
python:mainfrom
encukou:tp_base_unification
Open

gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases#151252
encukou wants to merge 6 commits into
python:mainfrom
encukou:tp_base_unification

Conversation

@encukou

@encukou encukou commented Jun 10, 2026

Copy link
Copy Markdown
Member

The initial implementation of PEP 820 worsened the error message when non-types are given as base types in Py_tp_bases & Py_tp_base (as Peter noted in the review).
Bring back the 'bases must be types' wording and add a 'got' note for easier debugging.

Improve slot ID documentation, and soft-deprecate Py_tp_base (as per the PEP).
Add more tests.

…ype bases

The initial implementation of PEP 820 worsened the error message
when non-types are given as base types in Py_tp_bases & Py_tp_base.
Bring back the 'bases must be types' wording and add a 'got' note for
easier debugging.

Improve slot ID documentation, and soft-deprecate Py_tp_base
(as per the PEP).
@read-the-docs-community

read-the-docs-community Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

Labels

awaiting core review needs backport to 3.15 pre-release feature fixes, bugs and security fixes topic-C-API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant