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-103484: Docs: add linkcheck allowed redirects entries for most cases by rffontenelle · Pull Request #103569 · python/cpython

Conversation

@rffontenelle

@rffontenelle rffontenelle commented Apr 15, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

This is one of the patches required to fix the current state of make linkcheck in Python Docs, see #103484.

This pull request solves the cases that result in the most output (8000+ of 8327 output lines) when running make linkcheck. Find below examples of each case.

c-api/intro.rst:178: [redirected permanently] https://bugs.python.org/issue?@action=redirect&bpo=33720 to https://github.com/python/cpython/issues/77901

This redirect is caused by using the bpo-NNNNN custom role, which links https://bugs.python.org/issueNNNNN. Accessing that will redirect to CPython's GitHub issues. Instead of changing all occurrences to GH-NNNNN, this marks that redirect as allowed.

whatsnew/3.12.rst:185: [redirected with Found] https://github.com/python/cpython/issues/100581 to https://github.com/python/cpython/pull/100581

This is caused by using GH-NNNNN (which links to GitHub issues) to link pull requests. Instead of adding a new syntax for GitHub pull requests, this marks that redirect as allowed.

library/collections.abc.rst:13: [redirected permanently] https://github.com/python/cpython/tree/main/Lib/_collections_abc.py to https://github.com/python/cpython/blob/main/Lib/_collections_abc.py

This is caused by using :source:`something` to link a file. source results in 'https://github.com/python/cpython/tree/main/' + something, but the url for files in GitHub repos is /blob/ instead of /tree/. Changing :source:'s URL from /tree/ to /blob/ wouldn't solve it because if a directory was linked, it would pop-up a redirect from /blob/ to /tree/. Hence it is better to allow this redirect.

  • Issue: Sphinx linkcheck and broken/redirect occurrences in Python Docs #103484

Sorry, something went wrong.

Uh oh!

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

All reactions
@rffontenelle
Docs: add some linkcheck allowed redirects entries
5862efd
@bedevere-bot bedevere-bot mentioned this pull request Apr 15, 2023
Sphinx linkcheck and broken/redirect occurrences in Python Docs #103484
Open
@bedevere-bot bedevere-bot added the awaiting review label Apr 15, 2023
@arhadthedev arhadthedev added the docs Documentation in the Doc dir label Apr 16, 2023
@hugovk hugovk added the skip news label Apr 16, 2023
hugovk
hugovk reviewed Apr 16, 2023
View reviewed changes
Comment thread Doc/conf.py Resolved

Uh oh!

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

@rffontenelle @hugovk
Doc: Use correct linkcheck_allowed_redirects in conf.py
b90c11e
Co-authored-by: Hugo van Kemenade <[email protected]>
hugovk
hugovk approved these changes Apr 16, 2023
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

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!

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Apr 16, 2023
@Ismaelkadir

This comment was marked as spam.

Sign in to view
merwok
merwok reviewed Apr 16, 2023
View reviewed changes
Comment thread Doc/conf.py Resolved

Uh oh!

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

@rffontenelle
Doc: Remove unneeded linkcheck_ignore entry
d630198
Linkcheck reports no issue with URLs to BPO
@hugovk
hugovk merged commit f39e00f into python:main Apr 18, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Apr 18, 2023
@hugovk

hugovk commented Apr 18, 2023

Copy link
Copy Markdown
Member

Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

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

@hugovk hugovk added the needs backport to 3.11 only security fixes label Apr 18, 2023
@miss-islington

miss-islington commented Apr 18, 2023

Copy link
Copy Markdown
Contributor

Thanks @rffontenelle for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 18, 2023
@rffontenelle @hugovk @miss-islington
pythonGH-103484: Docs: add linkcheck allowed redirects entries for mo…
aa460c5
…st cases (pythonGH-103569)

(cherry picked from commit f39e00f)

Co-authored-by: Rafael Fontenelle <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
@bedevere-bot

bedevere-bot commented Apr 18, 2023

Copy link
Copy Markdown

GH-103602 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 Apr 18, 2023
miss-islington added a commit that referenced this pull request Apr 18, 2023
@miss-islington @rffontenelle @hugovk
GH-103484: Docs: add linkcheck allowed redirects entries for most cas…
1dad3d1
…es (GH-103569)

(cherry picked from commit f39e00f)

Co-authored-by: Rafael Fontenelle <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
carljm added a commit to carljm/cpython that referenced this pull request Apr 20, 2023
@carljm
Merge branch 'main' into superopt
5c0a21c
* main: (24 commits)
  pythongh-98040: Move the Single-Phase Init Tests Out of test_imp (pythongh-102561)
  pythongh-83861: Fix datetime.astimezone() method (pythonGH-101545)
  pythongh-102856: Clean some of the PEP 701 tokenizer implementation (python#103634)
  pythongh-102856: Skip test_mismatched_parens in WASI builds (python#103633)
  pythongh-102856: Initial implementation of PEP 701 (python#102855)
  pythongh-103583: Add ref. dependency between multibytecodec modules (python#103589)
  pythongh-83004: Harden msvcrt further (python#103420)
  pythonGH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks (python#103626)
  pythongh-102778: IDLE - make sys.last_exc available in Shell after traceback (python#103314)
  pythongh-103582: Remove last references to `argparse.REMAINDER` from docs (python#103586)
  pythongh-103583: Always pass multibyte codec structs as const (python#103588)
  pythongh-103617: Fix compiler warning in _iomodule.c (python#103618)
  pythongh-103596: [Enum] do not shadow mixed-in methods/attributes (pythonGH-103600)
  pythonGH-100530: Change the error message for non-class class patterns (pythonGH-103576)
  pythongh-95299: Remove lingering setuptools reference in installer scripts (pythonGH-103613)
  [Doc] Fix a typo in optparse.rst (python#103504)
  pythongh-101100: Fix broken reference `__format__` in `string.rst` (python#103531)
  pythongh-95299: Stop installing setuptools as a part of ensurepip and venv (python#101039)
  pythonGH-103484: Docs: add linkcheck allowed redirects entries for most cases (python#103569)
  pythongh-67230: update whatsnew note for csv changes (python#103598)
  ...
@rffontenelle
rffontenelle deleted the patch-1 branch April 22, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@merwok merwok merwok left review comments
@hugovk hugovk hugovk 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.

7 participants

@rffontenelle @Ismaelkadir @hugovk @miss-islington @bedevere-bot @merwok @arhadthedev
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.