Visitar URL original
[3.11] GH-103484: Docs: add linkcheck allowed redirects entries for most cases (GH-103569) by miss-islington · Pull Request #103602 · python/cpython · GitHub
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
GH-103484: Docs: add linkcheck allowed redirects entries for most cas…
…es (GH-103569)

(cherry picked from commit f39e00f)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
  • Loading branch information
2 people authored and miss-islington committed Apr 18, 2023
commit aa460c5932066a3004f74ee4b0617a78a0fb02c9
11 changes: 8 additions & 3 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,14 @@
# Options for the link checker
# ----------------------------

# Ignore certain URLs.
linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+']

linkcheck_allowed_redirects = {
# bpo-NNNN -> BPO -> GH Issues
r'https://bugs.python.org/issue\?@action=redirect&bpo=\d+': 'https://github.com/python/cpython/issues/\d+',
# GH-NNNN used to refer to pull requests
r'https://github.com/python/cpython/issues/\d+': 'https://github.com/python/cpython/pull/\d+',
# :source:`something` linking files in the repository
r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*'
}

# Options for extensions
# ----------------------
Expand Down