8000 gh-92448: Update the documentation builder to render the GitHub issue… · python/cpython@45e1721 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 45e1721

Browse files
authored
gh-92448: Update the documentation builder to render the GitHub issue. (GH-92449)
1 parent d284e8b commit 45e1721

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

Doc/tools/extensions/pyspecific.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ def run(self):
429429

430430
# Support for including Misc/NEWS
431431

432-
issue_re = re.compile('(?:[Ii]ssue #|bpo-)([0-9]+)')
432+
issue_re = re.compile('(?:[Ii]ssue #|bpo-)([0-9]+)', re.I)
433+
gh_issue_re = re.compile('(?:gh-issue-|gh-)([0-9]+)', re.I)
433434
whatsnew_re = re.compile(r"(?im)^what's new in (.*?)\??$")
434435

435436

@@ -456,9 +457,9 @@ def run(self):
456457
text = 'The NEWS file is not available.'
457458
node = nodes.strong(text, text)
458459
return [node]
459-
content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/'
460-
r'issue?@action=redirect&bpo=\1>`__',
461-
content)
460+
content = issue_re.sub(r':issue:`\1`', content)
461+
# Fallback handling for the GitHub issue
462+
content = gh_issue_re.sub(r':gh:`\1`', content)
462463
content = whatsnew_re.sub(r'\1', content)
463464
# remove first 3 lines as they are the main heading
464465
lines = ['.. default-role:: obj', ''] + content.splitlines()[3:]

Misc/NEWS.d/3.10.0a6.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ now result in :exc:`MemoryError`. Patch by Erlend E. Aasland.
232232
.. section: Library
233233
234234
Fix segfault in :meth:`sqlite3.Connection.backup` if no argument was
235-
provided. The regression was introduced by GH-23838. Patch by Erlend E.
235+
provided. The regression was introduced by PR 23838. Patch by Erlend E.
236236
Aasland.
237237

238238
..

Misc/NEWS.d/3.10.0a7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ raised. Patch by Erlend E. Aasland.
574574
.. nonce: t9XEkQ
575575
.. section: Library
576576
577-
Fix a regression introduced in GH-24562, where an empty bytestring was
577+
Fix a regression introduced in PR 24562, where an empty bytestring was
578578
fetched as ``None`` instead of ``b''`` in :mod:`sqlite3`. Patch by Mariusz
579579
Felisiak.
580580

Misc/NEWS.d/3.10.0b1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ result from ``entry_points()`` as deprecated.
941941

942942
..
943943
944-
.. bpo: 47383
944+
.. gh: 47383
945945
.. date: 2021-04-08-19-32-26
946946
.. nonce: YI1hdL
947947
.. section: Library
@@ -1001,7 +1001,7 @@ some :mod:`dataclasses`.
10011001
10021002
Fix :mod:`sqlite3` regression for zero-sized blobs with converters, where
10031003
``b""`` was returned instead of ``None``. The regression was introduced by
1004-
GH-24723. Patch by Erlend E. Aasland.
1004+
PR 24723. Patch by Erlend E. Aasland.
10051005

10061006
..
10071007

Misc/NEWS.d/3.11.0a1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ use map function instead of genexpr in capwords.
15971597
.. section: Library
15981598
15991599
Fix typo: ``importlib.find_loader`` is really slated for removal in Python
1600-
3.12 not 3.10, like the others in GH-25169.
1600+
3.12 not 3.10, like the others in PR 25169.
16011601

16021602
Patch by Hugo van Kemenade.
16031603

Misc/NEWS.d/3.11.0b1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ planned). Patch by Alex Waygood.
570570

571571
..
572572
573-
.. bpo: 78157
573+
.. gh: 78157
574574
.. date: 2022-05-05-20-40-45
575575
.. nonce: IA_9na
576576
.. section: Library
@@ -1288,7 +1288,7 @@ Deprecate the chunk module.
12881288

12891289
..
12901290
1291-
.. bpo: 91498
1291+
.. gh: 91498
12921292
.. date: 2022-04-10-08-39-44
12931293
.. nonce: 8oII92
12941294
.. section: Library

Misc/NEWS.d/3.7.0a3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ by Nir Soffer.
288288

289289
..
290290
291-
.. bpo: 321010
291+
.. bpo: 32101
292292
.. date: 2017-11-29-00-42-47
293293
.. nonce: -axD5l
294294
.. section: Library

Misc/NEWS.d/3.8.0a1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4617,7 +4617,7 @@ Based on patch by c-fos.
46174617
.. section: Library
46184618
46194619
Remove HMAC default to md5 marked for removal in 3.8 (removal originally
4620-
planned in 3.6, bump to 3.8 in gh-7062).
4620+
planned in 3.6, bump to 3.8 in PR 7062).
46214621

46224622
..
46234623

Misc/NEWS.d/3.9.0a1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ module on POSIX systems.
13351335
.. nonce: 9TWMlz
13361336
.. section: Library
13371337
1338-
Revert GH-15522, which introduces a regression in
1338+
Revert PR 15522, which introduces a regression in
13391339
:meth:`mimetypes.guess_type` due to improper handling of filenames as urls.
13401340

13411341
..

0 commit comments

Comments
 (0)
0