Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11'#95937

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
iritkatriel merged 8 commits intopython:mainfromiritkatriel:whatsnew
Aug 13, 2022

Conversation

@iritkatriel
Copy link
Member

@iritkatrieliritkatriel commentedAug 12, 2022
edited by bedevere-bot
Loading

@bedevere-botbedevere-bot added docsDocumentation in the Doc dir skip news awaiting core review labelsAug 12, 2022
@gvanrossumgvanrossum changed the titlegh-95914: add paragraph about pep 654 in main body of 'what's new in 3.11'gh-95914: Add paragraph about pep 654 in main body of 'what's new in 3.11'Aug 12, 2022
@gvanrossumgvanrossum changed the titlegh-95914: Add paragraph about pep 654 in main body of 'what's new in 3.11'gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11'Aug 12, 2022
Copy link
Member

@gvanrossumgvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If you can add a link toexcept* in the docs, fine. Otherwise, fine too.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

In line with our policy that PEPs are historic documents, not documentation, maybe this should deep link to the part underhttps://docs.python.org/3.11/reference/compound_stmts.html#try whereexcept* is described?

CAM-Gerlach reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Both:keyword:`except* <except_star>` and:ref:`except* <except_star>` currently link to the beginning of thetry section, where theexcept_star label is defined. For a deep link, the label should be moved down to the relevant paragraph.

Copy link
Member

@CAM-GerlachCAM-GerlachAug 13, 2022
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actually, the keywordappears to be linked precisely, both judging fromits position in the source on both 3.12 and 3.11, and the fact that theindex entry correctlylinks 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.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
(Contributed by Irit Katriel in:issue:`45292`. PEP written by
(Contributed by Irit Katriel in:gh:`89455`. PEP written by

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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?


See:pep:`678` for more details.

(Contributed by Irit Katriel in:issue:`45607`. PEP written by
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
(Contributed by Irit Katriel in:issue:`45607`. PEP written by
(Contributed by Irit Katriel in:gh:`89770`. PEP written by

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Both:keyword:`except* <except_star>` and:ref:`except* <except_star>` currently link to the beginning of thetry section, where theexcept_star label is defined. For a deep link, the label should be moved down to the relevant paragraph.

@CAM-GerlachCAM-Gerlach added needs backport to 3.10only security fixes 3.10only security fixes needs backport to 3.11only security fixes 3.11only security fixes and removed needs backport to 3.10only security fixes 3.10only security fixes labelsAug 13, 2022
Copy link
Member

@CAM-GerlachCAM-Gerlach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks,@iritkatriel . A few relatively modest comments, mostly as applyable suggestions.

See:pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
and Ammar Askar in:issue:`43950`.)

Exception Groups and ``except*`` (PEP 654)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Could we be consistent about PEP numbers in Feature section titles? Right now the type hint PEP sections are in the formPEP 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).

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
Copy link
Member

@CAM-GerlachCAM-GerlachAug 13, 2022
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actually, the keywordappears to be linked precisely, both judging fromits position in the source on both 3.12 and 3.11, and the fact that theindex entry correctlylinks 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.

Comment on lines 200 to 205
default traceback.

See:pep:`678` for more details.

(Contributed by Irit Katriel in:issue:`45607`. PEP written by
Zac Hatfield-Dodds.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ok, I'll remove it and you can put it there.

CAM-Gerlach reacted with thumbs up emoji
iritkatrieland others added7 commitsAugust 13, 2022 12:18
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
@iritkatrieliritkatriel merged commit1402d2c intopython:mainAug 13, 2022
@miss-islington
Copy link
Contributor

Thanks@iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@iritkatrieliritkatriel deleted the whatsnew branchAugust 13, 2022 11:49
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestAug 13, 2022
…ew in 3.11' (pythonGH-95937)(cherry picked from commit1402d2c)Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@bedevere-bot
Copy link

GH-95954 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelAug 13, 2022
@CAM-Gerlach
Copy link
Member

A quick followup about theexcept* keyword—based on some testing by@ezio-melotti and myself, the index entry was a red herring; what actually happens with the :keyword: role is that it applies semantics and styling (i.e.literal, typically) but it just links to normal ref target labels, rather than ones created by a special directives, which theSphinx docs also confirm. I'll open a separate PR to move the relevant ref target labels incompound_statement to more precise locations.

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

Reviewers

@ezio-melottiezio-melottiezio-melotti left review comments

@CAM-GerlachCAM-GerlachCAM-Gerlach requested changes

@gvanrossumgvanrossumgvanrossum approved these changes

@1st11st1Awaiting requested review from 1st1

Assignees

No one assigned

Labels

3.11only security fixesdocsDocumentation in the Doc dirskip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@iritkatriel@miss-islington@bedevere-bot@CAM-Gerlach@gvanrossum@ezio-melotti

[8]ページ先頭

©2009-2025 Movatter.jp