Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Description
Runningmake linkcheck
in Doc folder outputs thousands of broken and redirected status. It would be nice to clean this up so we can link-check Python in CI/CD for each commit, but right now it is too polluted.
Some of these occurrences could/should be fixed in the docs itself, others can benefit fromSphinx's linkcheck configs e.g.linkcheck_ignore
andlinkcheck_allow_redirect
.
Seelinkcheck-log.txt for the full log as of commitf2b7ecb.
Fun stats obtained from the above file:
- Of its 8327 lines, where 7824 are related to BPO -> GH issues. Of 7824, 5744 lines are from whatsnew/changelog and only 20 are not from whatsnew/
- 241 lines are redirection of CPython CVS URL, fixing /tree/ to /blob/ in GitHub URL
- 28 lines are broken links, where one broken link is 'https://' from an example in whatsnet/changelog
The way I see, this steps divide in:
- Clean BPO to GH redirection messages
- Fix broken links
- Clean CPython CVS URL redirections
- Clean GH issues to GH PR redirections
- Fix the rest of the occurrences.
linkcheck_allow_redirect and linkcheck_ignore can be very handy in this case. linkcheck_allow_redirect makes 'ok' status a redirect that is being spotted by linkcheck, and we have linkcheck_ignore as the last resource.
Questions I have before implementing the solution:
- Documentation hosted by Read The Docs may have language enabled so example.com is redirected to example.com/en/latest. To handle occurrences, I could add them to linkcheck_allow_redirect or we can usesphinx-ext-intersphinx to map a keyword to the documentation URL (e.g 'rtd' for read-the-docs docs). The last option allows to map to proper language of the target URL linked, similar on howWeblate did)
- Is there any restrictions to fix broken/redirect links in old whatsnew/.rst?
- Is there any restrictions to fix broken/redirect links in old whatsnew/changelog.rst (i.e. Misc/NEWS)?
- Should I create a single Pull Request for all the fixes?
Linked PRs
- GH-103484: Docs: add linkcheck allowed redirects entries for most cases #103569
- [3.11] GH-103484: Docs: add linkcheck allowed redirects entries for most cases (GH-103569) #103602
- GH-103484: Fix broken links reported by linkcheck #103608
- [3.11] GH-103484: Fix broken links reported by linkcheck (GH-103608) #103683
- GH-103484: Fix redirected permanently URLs #104001
- [3.11] GH-103484: Fix redirected permanently URLs (GH-104001) #104088
- GH-103484: Tell linkcheck to ignore debian manpage redirects #123019
- [3.12] GH-103484: Tell linkcheck to ignore debian manpage redirects (GH-123019) #124136
- [3.13] GH-103484: Tell linkcheck to ignore debian manpage redirects (GH-123019) #124137
- GH-103484: Fix permanently redirects reported by linkcheck #124144
- [3.13] GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) #124151
- [3.12] GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) #124152
- GH-103484: Fix broken links reported by linkcheck #124169
- [3.13] GH-103484: Fix broken links reported by linkcheck (GH-124169) #124179
- [3.12] GH-103484: Fix broken links reported by linkcheck (GH-124169) #124180
- [3.12]: gh-103484: Relink _xxsubinterpretersmodule.c in whatsnew/3.12.rst #124183
Metadata
Metadata
Assignees
Projects
Status