summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Fontenelle <rffontenelle@users.noreply.github.com>2023-04-18 02:57:53 (GMT)
committerGitHub <noreply@github.com>2023-04-18 02:57:53 (GMT)
commitf39e00f9521a0d412a5fc9a50f2a553ec2bb1a7c (patch)
tree1a34de6cec4d77a887e3146e0e30e80e628bef74
parente35e0f15eba64a1dcbab10bbbd2ce276e190dcfa (diff)
downloadcpython-f39e00f9521a0d412a5fc9a50f2a553ec2bb1a7c.zip
cpython-f39e00f9521a0d412a5fc9a50f2a553ec2bb1a7c.tar.gz
cpython-f39e00f9521a0d412a5fc9a50f2a553ec2bb1a7c.tar.bz2
GH-103484: Docs: add linkcheck allowed redirects entries for most cases (#103569)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
-rw-r--r--Doc/conf.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index e99b801..60404fd3 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -254,9 +254,14 @@ coverage_ignore_c_items = {
# 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
# ----------------------