]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] gh-92448: Update the documentation builder to render the GitHub issue (GH...
authorDong-hee Na <donghee.na@python.org>
Sun, 8 May 2022 13:31:40 +0000 (22:31 +0900)
committerGitHub <noreply@github.com>
Sun, 8 May 2022 13:31:40 +0000 (22:31 +0900)
Doc/tools/extensions/pyspecific.py
Misc/NEWS.d/3.10.0a6.rst
Misc/NEWS.d/3.10.0a7.rst
Misc/NEWS.d/3.10.0b1.rst
Misc/NEWS.d/3.10.1.rst
Misc/NEWS.d/3.7.0a3.rst
Misc/NEWS.d/3.8.0a1.rst
Misc/NEWS.d/3.9.0a1.rst

index cbb7638627ef1468e11b77571f028a20f2339244..27004afc0bab99c454ec2b67d46a91194a79f512 100644 (file)
@@ -429,7 +429,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 (.*?)\??$")
 
 
@@ -456,9 +457,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:]
index a4ee9ae098bd932a3da8fe9ea4f14fa9e61b66ae..803df6f51ce628a5a89eeded368da820c4576cbb 100644 (file)
@@ -232,7 +232,7 @@ now result in :exc:`MemoryError`. Patch by Erlend E. Aasland.
 .. section: Library
 
 Fix segfault in :meth:`sqlite3.Connection.backup` if no argument was
-provided. The regression was introduced by GH-23838. Patch by Erlend E.
+provided. The regression was introduced by PR 23838. Patch by Erlend E.
 Aasland.
 
 ..
index f62be491d56dd6d55e88b1f3a89c636381c68fe4..864dc2cb90a9f11715f2b4a22c6eaf87f9b71857 100644 (file)
@@ -574,7 +574,7 @@ raised. Patch by Erlend E. Aasland.
 .. nonce: t9XEkQ
 .. section: Library
 
-Fix a regression introduced in GH-24562, where an empty bytestring was
+Fix a regression introduced in PR 24562, where an empty bytestring was
 fetched as ``None`` instead of ``b''`` in :mod:`sqlite3`. Patch by Mariusz
 Felisiak.
 
index 4731dca2e74cf7c3c2953e13b521a6f6b8121561..345a9173a0dd78520b14dbffb2afa95da9a8bb43 100644 (file)
@@ -941,7 +941,7 @@ result from ``entry_points()`` as deprecated.
 
 ..
 
-.. bpo: 47383
+.. gh: 47383
 .. date: 2021-04-08-19-32-26
 .. nonce: YI1hdL
 .. section: Library
@@ -1001,7 +1001,7 @@ some :mod:`dataclasses`.
 
 Fix :mod:`sqlite3` regression for zero-sized blobs with converters, where
 ``b""`` was returned instead of ``None``. The regression was introduced by
-GH-24723. Patch by Erlend E. Aasland.
+PR 24723. Patch by Erlend E. Aasland.
 
 ..
 
index 0f8938ab6154d813f7a00dca0f7c4bc951434d5b..8ef3cd124619eb4f5145bd2f17e90a633c5c2383 100644 (file)
@@ -730,7 +730,7 @@ Patch by Kyungmin Lee.
 .. section: Library
 
 Fix typo: ``importlib.find_loader`` is really slated for removal in Python
-3.12 not 3.10, like the others in GH-25169.
+3.12 not 3.10, like the others in PR 25169.
 
 Patch by Hugo van Kemenade.
 
index 067720efa516e0633a796cf5fd558bc7a6c7a2fb..6576c1fadbff6ddb89d8b64399098d4a2b8db75f 100644 (file)
@@ -288,7 +288,7 @@ by Nir Soffer.
 
 ..
 
-.. bpo: 321010
+.. bpo: 32101
 .. date: 2017-11-29-00-42-47
 .. nonce: -axD5l
 .. section: Library
index 5cd3fa32105c274b8de4d40e17942b9b6faa588f..09b858d250c337e2489fd93d599c9c43cab7013a 100644 (file)
@@ -4617,7 +4617,7 @@ Based on patch by c-fos.
 .. section: Library
 
 Remove HMAC default to md5 marked for removal in 3.8 (removal originally
-planned in 3.6, bump to 3.8 in gh-7062).
+planned in 3.6, bump to 3.8 in PR 7062).
 
 ..
 
index a9b6694c133f190b2ee8f775a112130553b88a3a..45f232f1948d5dfea9c10341464a23b7b63bc3f6 100644 (file)
@@ -1335,7 +1335,7 @@ module on POSIX systems.
 .. 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.
 
 ..