-
- Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-136209: Add .. c:var:: declarations for C exception types #136210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This info wasn't kept updated, and is of questionable value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I tried to do this before, but gave up when I saw that it was impossible to get rid of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add space between three tables? Each table has certain order. When they are merged, there is no order.
We now can! We're using Sphinx 8.2 for 3.12+ (and 7.2 for 3.11): Line 10 in c45da6a
|
Co-authored-by: Victor Stinner <vstinner@python.org>
But, I'm OK with this
I think it's only possible with three separate tables, with misaligned columns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I like the 3 tables. It's closer to the documentation of Python exceptions: https://docs.python.org/dev/library/exceptions.html (grouped by categories, as C API exceptions now).
I have no opinion on :no-typesetting:
.
:c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that | ||
uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here is a better place for .. _standardwarningcategories:
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your update.
I have no strong preference about the look of the definitions. Stable ABI notes has their value, although they are repetitive and take much space. We could add notes or a special column for the stable ABI version, but this will make the sources even larger. So I left this on you and other reviewers.
Three tables with separate subsection names look much better to me. If you want to align column widths, there is a ways to specify column widths explicitly.
.. c:var::
declarations for C exception types. (This needs the type, and adds stable ABI declarations.)list-table
to avoid overlong linesnitpick_ignore
📚 Documentation preview 📚: https://cpython-previews--136210.org.readthedocs.build/