From 5862efd3b0dbf5f56d0b25a0bffb3e43c5a894b9 Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Sat, 15 Apr 2023 12:06:22 -0300 Subject: [PATCH 1/3] Docs: add some linkcheck allowed redirects entries --- Doc/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Doc/conf.py b/Doc/conf.py index e99b801d0ae87a..7b99bac1444275 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -254,6 +254,15 @@ # Options for the link checker # ---------------------------- +linkcheck_allow_redirect = { + # 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/.*' +} + # Ignore certain URLs. linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+'] From b90c11e6b06d3062690473307ae51ee4b028165f Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Sun, 16 Apr 2023 07:07:13 -0300 Subject: [PATCH 2/3] Doc: Use correct linkcheck_allowed_redirects in conf.py Co-authored-by: Hugo van Kemenade --- Doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/conf.py b/Doc/conf.py index 7b99bac1444275..939c0c022026e8 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -254,7 +254,7 @@ # Options for the link checker # ---------------------------- -linkcheck_allow_redirect = { +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 From d63019874e744f35a3d01473b9e9fdb6df40fb0b Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Sun, 16 Apr 2023 21:14:41 -0300 Subject: [PATCH 3/3] Doc: Remove unneeded linkcheck_ignore entry Linkcheck reports no issue with URLs to BPO --- Doc/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index 939c0c022026e8..60404fd3829e5b 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -263,10 +263,6 @@ r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*' } -# Ignore certain URLs. -linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+'] - - # Options for extensions # ----------------------