10000 [3.9] gh-92448: Update the documentation builder to render the GitHub… · python/cpython@4802344 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4802344

Browse files
authored
[3.9] gh-92448: Update the documentation builder to render the GitHub issue. (GH-92449). (GH-92458)
1 parent 4a2337f commit 4802344

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

Doc/tools/extensions/pyspecific.py

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

392392
# Support for including Misc/NEWS
393393

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

397398

@@ -418,9 +419,9 @@ def run(self):
418419
text = 'The NEWS file is not available.'
419420
node = nodes.strong(text, text)
420421
return [node]
421-
content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/'
422-
r'issue?@action=redirect&bpo=\1>`__',
423-
content)
422+
content = issue_re.sub(r':issue:`\1`', content)
423+
# Fallback handling for the GitHub issue
424+
content = gh_issue_re.sub(r':gh:`\1`', content)
424425
content = whatsnew_re.sub(r'\1', content)
425426
# remove first 3 lines as they are the main heading
426427
lines = ['.. default-role:: obj', ''] + content.splitlines()[3:]

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