gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11'#95937
gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11'#95937iritkatriel merged 8 commits intopython:mainfrom
Conversation
gvanrossum
left a comment
There was a problem hiding this comment.
If you can add a link to except* in the docs, fine. Otherwise, fine too.
Doc/whatsnew/3.11.rst
Outdated
| to raise and handle multiple unrelated exceptions simultaneously. | ||
| The builtin types :exc:`ExceptionGroup` and :exc:`BaseExceptionGroup` | ||
| make it possible to group exceptions and raise them together. | ||
| The new ``except*`` syntax generalizes ``except`` to match subgroups |
There was a problem hiding this comment.
In line with our policy that PEPs are historic documents, not documentation, maybe this should deep link to the part under https://docs.python.org/3.11/reference/compound_stmts.html#try where except* is described?
There was a problem hiding this comment.
Both :keyword:`except* <except_star>` and :ref:`except* <except_star>` currently link to the beginning of the try section, where the except_star label is defined. For a deep link, the label should be moved down to the relevant paragraph.
There was a problem hiding this comment.
Actually, the keyword appears to be linked precisely, both judging from its position in the source on both 3.12 and 3.11, and the fact that the index entry correctly links to it. But maybe a :keyword: ref doesn't?
However, the :ref: is indeed not; it would be good to move the non-try ones (that presumably don't rely on the section name for default link text, since it doesn't even mention except/else/finally) down to the appropriate passages.
There was a problem hiding this comment.
I think a link to the top of the section is fine.
|
|
||
| See :pep:`654` for more details. | ||
|
|
||
| (Contributed by Irit Katriel in :issue:`45292`. PEP written by |
There was a problem hiding this comment.
| (Contributed by Irit Katriel in :issue:`45292`. PEP written by | |
| (Contributed by Irit Katriel in :gh:`89455`. PEP written by |
There was a problem hiding this comment.
This should be done (if at all) in a separate PR where the summary reference to the same issue is updated as well.
I say "if at all" because this is not historically accurate - I did the work under a bpo issue. Are you going to change all references to bpo issues in the docs to the gh issues they were mapped to?
Doc/whatsnew/3.11.rst
Outdated
|
|
||
| See :pep:`678` for more details. | ||
|
|
||
| (Contributed by Irit Katriel in :issue:`45607`. PEP written by |
There was a problem hiding this comment.
| (Contributed by Irit Katriel in :issue:`45607`. PEP written by | |
| (Contributed by Irit Katriel in :gh:`89770`. PEP written by |
Doc/whatsnew/3.11.rst
Outdated
| to raise and handle multiple unrelated exceptions simultaneously. | ||
| The builtin types :exc:`ExceptionGroup` and :exc:`BaseExceptionGroup` | ||
| make it possible to group exceptions and raise them together. | ||
| The new ``except*`` syntax generalizes ``except`` to match subgroups |
There was a problem hiding this comment.
Both :keyword:`except* <except_star>` and :ref:`except* <except_star>` currently link to the beginning of the try section, where the except_star label is defined. For a deep link, the label should be moved down to the relevant paragraph.
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Thanks, @iritkatriel . A few relatively modest comments, mostly as applyable suggestions.
Doc/whatsnew/3.11.rst
Outdated
| See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya | ||
| and Ammar Askar in :issue:`43950`.) | ||
|
|
||
| Exception Groups and ``except*`` (PEP 654) |
There was a problem hiding this comment.
Could we be consistent about PEP numbers in Feature section titles? Right now the type hint PEP sections are in the form PEP NNN: <Title>, this section and the one below is in the form <Title> (PEP NNN), and the two above it don't mention the PEP number at all in the title.
IMO, it would seem to make sense to either elide the PEP numbers in the New Features section titles (as I do for the section below in #95914 , since they don't add much value for most users and are already mentioned/linked in the section body and Summary), or consistently use them with the same format between these two sections (I can take care of the others in my separate PRs, but it would be nice to be consistent here).
Doc/whatsnew/3.11.rst
Outdated
| to raise and handle multiple unrelated exceptions simultaneously. | ||
| The builtin types :exc:`ExceptionGroup` and :exc:`BaseExceptionGroup` | ||
| make it possible to group exceptions and raise them together. | ||
| The new ``except*`` syntax generalizes ``except`` to match subgroups |
There was a problem hiding this comment.
Actually, the keyword appears to be linked precisely, both judging from its position in the source on both 3.12 and 3.11, and the fact that the index entry correctly links to it. But maybe a :keyword: ref doesn't?
However, the :ref: is indeed not; it would be good to move the non-try ones (that presumably don't rely on the section name for default link text, since it doesn't even mention except/else/finally) down to the appropriate passages.
Doc/whatsnew/3.11.rst
Outdated
| default traceback. | ||
|
|
||
| See :pep:`678` for more details. | ||
|
|
||
| (Contributed by Irit Katriel in :issue:`45607`. PEP written by | ||
| Zac Hatfield-Dodds.) |
There was a problem hiding this comment.
Could we make these changes in #95915 instead, since that PR is closer to the scope of the change (copyediting existing entries vs. adding a specific new one), and it will cause a significant merge conflict for whichever PR gets merged second otherwise?
There was a problem hiding this comment.
ok, I'll remove it and you can put it there.
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
|
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…ew in 3.11' (pythonGH-95937) (cherry picked from commit 1402d2c) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
GH-95954 is a backport of this pull request to the 3.11 branch. |
|
A quick followup about the |
Uh oh!
There was an error while loading. Please reload this page.