Skip to content

gh-156870: Use a manual Stable ABI note for the exception type tables - #156875

Closed
owenthcarey wants to merge 1 commit into
python:mainfrom
owenthcarey:gh-156870-stable-abi-table-notes
Closed

gh-156870: Use a manual Stable ABI note for the exception type tables#156875
owenthcarey wants to merge 1 commit into
python:mainfrom
owenthcarey:gh-156870-stable-abi-table-notes

Conversation

@owenthcarey

@owenthcarey owenthcarey commented Sep 3, 2026

Copy link
Copy Markdown

In compact tables of many similar definitions, the generated "Part of the Stable ABI" notes get repetitive and take up a lot of vertical space.

This PR lets the c_annotations extension skip the generated note for elements inside a container with the no-stable-abi-notes class (set with :class: on a list-table), and uses it for the three tables of exception and warning types in Doc/c-api/exceptions.rst. Each table gets an S.ABI column with the version in which the pointer was added to the Stable ABI (empty for 3.2, N/A when it isn't part of the Stable ABI), and a common note before it, as in the mockup on the issue.

The notes for the functions on the same page, and for definitions in tables on other pages (for example Doc/c-api/iterator.rst), are unchanged. If this approach is fine, the same treatment could be applied to the type table in iterator.rst in a follow-up.

Verified locally with make -C Doc html (fails on warnings), a nitpicky build of the page, and make -C Doc check.

…tables

In compact tables of many similar definitions, the generated
"Part of the Stable ABI" notes are repetitive and take up a lot of
vertical space.

Let the c_annotations extension skip the generated note for elements
inside a container with the "no-stable-abi-notes" class, and use it
for the three tables of exception and warning types in the C API docs.
Each table gets an "S.ABI" column with the version in which the
pointer was added to the Stable ABI, and a common note before it.
@python-cla-bot

python-cla-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@picnixz

picnixz commented Sep 3, 2026

Copy link
Copy Markdown
Member

Please refrain from opening PR for issues that already have one especially if they are generated by AI, otherwise we will restrict your access.

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