summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2022-05-09 23:37:43 -0500
committerGitHub <noreply@github.com>2022-05-10 00:37:43 -0400
commitaebbd7579a421208f48dd6884b67dbd3278b71ad (patch)
tree0d83ae2e55da4854c9b7f8a897d01bbba39d8f61
parent73317e3c155446c6127b3d10a31ef421b73effe5 (diff)
downloadcpython-git-aebbd7579a421208f48dd6884b67dbd3278b71ad.tar.gz
gh-92448: Update the documentation builder to render the GitHub issue (GH-92600)
-rw-r--r--Doc/tools/extensions/pyspecific.py9
-rw-r--r--Misc/NEWS.d/3.7.0a3.rst2
-rw-r--r--Misc/NEWS.d/3.7.5.rst2
-rw-r--r--Misc/NEWS.d/3.7.7rc1.rst2
4 files changed, 8 insertions, 7 deletions
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index e4f45414db..ce8de25942 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -309,7 +309,8 @@ class DeprecatedRemoved(Directive):
# Support for including Misc/NEWS
-issue_re = re.compile('(?:[Ii]ssue #|bpo-)([0-9]+)')
+issue_re = re.compile('(?:[Ii]ssue #|bpo-)([0-9]+)', re.I)
+gh_issue_re = re.compile('(?:gh-issue-|gh-)([0-9]+)', re.I)
whatsnew_re = re.compile(r"(?im)^what's new in (.*?)\??$")
@@ -336,9 +337,9 @@ class MiscNews(Directive):
text = 'The NEWS file is not available.'
node = nodes.strong(text, text)
return [node]
- content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/'
- r'issue?@action=redirect&bpo=\1>`__',
- content)
+ content = issue_re.sub(r':issue:`\1`', content)
+ # Fallback handling for the GitHub issue
+ content = gh_issue_re.sub(r':gh:`\1`', content)
content = whatsnew_re.sub(r'\1', content)
# remove first 3 lines as they are the main heading
lines = ['.. default-role:: obj', ''] + content.splitlines()[3:]
diff --git a/Misc/NEWS.d/3.7.0a3.rst b/Misc/NEWS.d/3.7.0a3.rst
index 176441e2b0..1826f8601d 100644
--- a/Misc/NEWS.d/3.7.0a3.rst
+++ b/Misc/NEWS.d/3.7.0a3.rst
@@ -289,7 +289,7 @@ by Nir Soffer.
..
-.. bpo: 321010
+.. bpo: 32101
.. date: 2017-11-29-00-42-47
.. nonce: -axD5l
.. section: Library
diff --git a/Misc/NEWS.d/3.7.5.rst b/Misc/NEWS.d/3.7.5.rst
index f01978263c..ed907d42f1 100644
--- a/Misc/NEWS.d/3.7.5.rst
+++ b/Misc/NEWS.d/3.7.5.rst
@@ -13,7 +13,7 @@ Prevent ctypes crash when handling arrays in structs/unions.
.. nonce: 9TWMlz
.. section: Library
-Revert GH-15522, which introduces a regression in
+Revert PR 15522, which introduces a regression in
:meth:`mimetypes.guess_type` due to improper handling of filenames as urls.
..
diff --git a/Misc/NEWS.d/3.7.7rc1.rst b/Misc/NEWS.d/3.7.7rc1.rst
index 27d05ab4f3..c87aec8e68 100644
--- a/Misc/NEWS.d/3.7.7rc1.rst
+++ b/Misc/NEWS.d/3.7.7rc1.rst
@@ -180,7 +180,7 @@ Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry.
.. section: Library
The original fix for bpo-27657, "Fix urlparse() with numeric paths"
-(GH-16839) included in 3.7.6, inadvertently introduced a behavior change
+(PR 16839) included in 3.7.6, inadvertently introduced a behavior change
that broke several third-party packages relying on the original undefined
parsing behavior. The change is reverted in 3.7.7, restoring the behavior of
3.7.5 and earlier releases.