gh-156870: Use a manual Stable ABI note for the exception type tables - #156875
Closed
owenthcarey wants to merge 1 commit into
Closed
gh-156870: Use a manual Stable ABI note for the exception type tables#156875owenthcarey wants to merge 1 commit into
owenthcarey wants to merge 1 commit into
Conversation
…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.
owenthcarey
requested review from
AA-Turner,
StanFromIreland,
ZeroIntensity and
hugovk
as code owners
September 3, 2026 07:30
|
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 |
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. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_annotationsextension skip the generated note for elements inside a container with theno-stable-abi-notesclass (set with:class:on alist-table), and uses it for the three tables of exception and warning types inDoc/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 initerator.rstin a follow-up.Verified locally with
make -C Doc html(fails on warnings), a nitpicky build of the page, andmake -C Doc check.