GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-95975: Move except/*/finally ref labels to more precise locations by CAM-Gerlach · Pull Request #95976 · python/cpython

Conversation

@CAM-Gerlach

@CAM-Gerlach CAM-Gerlach commented Aug 14, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

As originally discussed in #95937 and documented in #95975 , the ref target labels for the except, except* and finally keywords are not very precise. Therefore, this moves them to more appropriate locations.

Additionally, since it is evidently required to ensure :keyword: keeps working, the section already organized by clause and it would aid navigation for readers on that page as well (since the section is quite long as it is), it adds subsections for each clause type.

finally, it moves the short paragraph directing the reader to other resources to the end of the top-level introduction section, rather than the end of the finally subsection, as it is not finally-specific (whereas the versionchanged after it is), and is also easier for readers to to find.

  • Issue: Ref target labels for except/except*/finally not located precisely #95975

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
CAM-Gerlach added 3 commits August 14, 2022 00:20
@CAM-Gerlach
pythongh-95975: Move except/*/finally ref labels to more precise loca…
f741f38
…tions
@CAM-Gerlach
Add section headers to fix :keyword: role and aid navigation
6a0721d
@CAM-Gerlach
Move see also to the introduction rather than a particular subsection
b4eca9e
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting review labels Aug 14, 2022
@CAM-Gerlach
CAM-Gerlach requested a review from ezio-melotti August 14, 2022 06:09
@CAM-Gerlach CAM-Gerlach mentioned this pull request Aug 14, 2022
Ref target labels for except/except*/finally not located precisely #95975
Closed
@CAM-Gerlach CAM-Gerlach added the needs backport to 3.11 only security fixes label Aug 14, 2022
@CAM-Gerlach CAM-Gerlach mentioned this pull request Aug 14, 2022
List and document remaining significant PEPs in What's New in 3.11 #95914
Closed
5 tasks done
ezio-melotti
ezio-melotti approved these changes Aug 14, 2022
View reviewed changes
Comment thread Doc/reference/compound_stmts.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Aug 14, 2022
@CAM-Gerlach @ezio-melotti
Fix other minor Sphinx syntax issues with except
5db46b9
Co-authored-by: Ezio Melotti <[email protected]>
@CAM-Gerlach CAM-Gerlach mentioned this pull request Sep 19, 2022
Edit What's New for Python 3.11 #95913
Closed
31 of 33 tasks
@CAM-Gerlach
CAM-Gerlach requested a review from ezio-melotti September 19, 2022 16:00
@CAM-Gerlach

CAM-Gerlach commented Sep 19, 2022

Copy link
Copy Markdown
Member Author

@ezio-melotti sorry, forgot to re-request review since you'd already approved it

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

CAM-Gerlach
CAM-Gerlach commented Sep 19, 2022
View reviewed changes
Comment thread Doc/reference/compound_stmts.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach
Suppress redundant link to same section for except too
89c69bb
ezio-melotti
ezio-melotti approved these changes Sep 20, 2022
View reviewed changes
Comment thread Doc/reference/compound_stmts.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/compound_stmts.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/reference/compound_stmts.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach CAM-Gerlach mentioned this pull request Sep 22, 2022
gh-96265: Fix some formatting in faq/design.rst #96924
Merged
CAM-Gerlach added 2 commits September 22, 2022 17:43
@CAM-Gerlach
Don't link try/except/else/finally keywords if in the same section
84a0209
@CAM-Gerlach
Format try/except/finally as keywords in modified sections
cbe74ab
@CAM-Gerlach
CAM-Gerlach requested a review from ezio-melotti September 23, 2022 18:23
ezio-melotti
ezio-melotti approved these changes Sep 24, 2022
View reviewed changes
@CAM-Gerlach

CAM-Gerlach commented Oct 2, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Hey @ezio-melotti any blockers to getting this merged so we can hopefully get it into 3.11 (@pablogsal ?) Also, looks like more possible approval spam...

ezio-melotti reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ezio-melotti
ezio-melotti merged commit dcc8233 into python:main Oct 2, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Oct 2, 2022
@miss-islington

miss-islington commented Oct 2, 2022

Copy link
Copy Markdown
Contributor

Thanks @CAM-Gerlach for the PR, and @ezio-melotti for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Oct 2, 2022

Copy link
Copy Markdown

GH-97722 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Oct 2, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 2, 2022
@CAM-Gerlach @miss-islington
pythongh-95975: Move except/*/finally ref labels to more precise loca…
4fee86b
…tions (pythonGH-95976)

* pythongh-95975: Move except/*/finally ref labels to more precise locations

* Add section headers to fix :keyword: role and aid navigation

* Move see also to the introduction rather than a particular subsection

* Fix other minor Sphinx syntax issues with except

Co-authored-by: Ezio Melotti <[email protected]>

* Suppress redundant link to same section for except too

* Don't link try/except/else/finally keywords if in the same section

* Format try/except/finally as keywords in modified sections

Co-authored-by: Ezio Melotti <[email protected]>
(cherry picked from commit dcc8233)

Co-authored-by: C.A.M. Gerlach <[email protected]>
miss-islington added a commit that referenced this pull request Oct 2, 2022
@miss-islington @CAM-Gerlach
gh-95975: Move except/*/finally ref labels to more precise locations (G…
1fa848a
…H-95976)

* gh-95975: Move except/*/finally ref labels to more precise locations

* Add section headers to fix :keyword: role and aid navigation

* Move see also to the introduction rather than a particular subsection

* Fix other minor Sphinx syntax issues with except

Co-authored-by: Ezio Melotti <[email protected]>

* Suppress redundant link to same section for except too

* Don't link try/except/else/finally keywords if in the same section

* Format try/except/finally as keywords in modified sections

Co-authored-by: Ezio Melotti <[email protected]>
(cherry picked from commit dcc8233)

Co-authored-by: C.A.M. Gerlach <[email protected]>
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Oct 2, 2022
@CAM-Gerlach @ezio-melotti @serhiy-storchaka
pythongh-95975: Move except/*/finally ref labels to more precise loca…
879e866
…tions (python#95976)

* pythongh-95975: Move except/*/finally ref labels to more precise locations

* Add section headers to fix :keyword: role and aid navigation

* Move see also to the introduction rather than a particular subsection

* Fix other minor Sphinx syntax issues with except

Co-authored-by: Ezio Melotti <[email protected]>

* Suppress redundant link to same section for except too

* Don't link try/except/else/finally keywords if in the same section

* Format try/except/finally as keywords in modified sections

Co-authored-by: Ezio Melotti <[email protected]>
carljm added a commit to carljm/cpython that referenced this pull request Oct 3, 2022
@carljm
Merge branch 'main' into dictwatch
e83abac
* main: (2069 commits)
  pythongh-96512: Move int_max_str_digits setting to PyConfig (python#96944)
  pythongh-94808: Coverage: Check picklablability of calliter (python#95923)
  pythongh-94808: Add test coverage for PyObject_HasAttrString (python#96627)
  pythongh-94732: Fix KeyboardInterrupt race in asyncio run_forever() (python#97765)
  Fix typos in `bltinmodule.c`. (pythonGH-97766)
  pythongh-94808: `_PyLineTable_StartsLine` was not used (pythonGH-96609)
  pythongh-97681: Remove Tools/demo/ directory (python#97682)
  Fix typo in unittest docs (python#97742)
  pythongh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (pythonGH-97729)
  pythongh-95913: Fix PEP number in PEP 678 What's New ref label (python#97739)
  pythongh-95913: Copyedit/improve New Modules What's New section (python#97721)
  pythongh-97740: Fix bang in Sphinx C domain ref target syntax (python#97741)
  pythongh-96819: multiprocessing.resource_tracker: check if length of pipe write <= 512 (python#96890)
  pythongh-97706: multiprocessing tests: Delete unused variable `rand` (python#97707)
  pythonGH-85447: Clarify docs about awaiting future multiple times (python#97738)
  [docs] Update logging cookbook with recipe for using a logger like an output… (pythonGH-97730)
  pythongh-97607: Fix content parsing in the impl-detail reST directive (python#97652)
  pythongh-95975: Move except/*/finally ref labels to more precise locations (python#95976)
  pythongh-97591: In `Exception.__setstate__()` acquire strong references before calling `tp_hash` slot (python#97700)
  pythongh-95588: Drop the safety claim from `ast.literal_eval` docs. (python#95919)
  ...
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
@miss-islington @CAM-Gerlach @pablogsal
gh-95975: Move except/*/finally ref labels to more precise locations (G…
d79a412
…H-95976)

* gh-95975: Move except/*/finally ref labels to more precise locations

* Add section headers to fix :keyword: role and aid navigation

* Move see also to the introduction rather than a particular subsection

* Fix other minor Sphinx syntax issues with except

Co-authored-by: Ezio Melotti <[email protected]>

* Suppress redundant link to same section for except too

* Don't link try/except/else/finally keywords if in the same section

* Format try/except/finally as keywords in modified sections

Co-authored-by: Ezio Melotti <[email protected]>
(cherry picked from commit dcc8233)

Co-authored-by: C.A.M. Gerlach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ezio-melotti ezio-melotti ezio-melotti approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@CAM-Gerlach @miss-islington @bedevere-bot @ezio-melotti
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.