Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a5ed894

Browse files
authored
[3.8] pythongh-92448: Update the documentation builder to render the GitHub… (pythonGH-92605)
(cherry picked from commit 45e1721) Co-authored-by: Dong-hee Na <[email protected]>
1 parent 10bc004 commit a5ed894

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

Doc/tools/extensions/pyspecific.py

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

391391
# Support for including Misc/NEWS
392392

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

396397

@@ -417,9 +418,9 @@ def run(self):
417418
text = 'The NEWS file is not available.'
418419
node = nodes.strong(text, text)
419420
return [node]
420-
content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/'
421-
r'issue?@action=redirect&bpo=\1>`__',
422-
content)
421+
content = issue_re.sub(r':issue:`\1`', content)
422+
# Fallback handling for the GitHub issue
423+
content = gh_issue_re.sub(r':gh:`\1`', content)
423424
content = whatsnew_re.sub(r'\1', content)
424425
# remove first 3 lines as they are the main heading
425426
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.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ none were collected.
2828
.. nonce: 9TWMlz
2929
.. section: Library
3030
31-
Revert GH-15522, which introduces a regression in
31+
Revert PR 15522, which introduces a regression in
3232
:meth:`mimetypes.guess_type` due to improper handling of filenames as urls.
3333

3434
..

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.8.2rc2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Syntax errors raised in the tokenizer now always set correct "text" and
5454
.. section: Library
5555
5656
The original fix for bpo-27657, "Fix urlparse() with numeric paths"
57-
(GH-16839) included in 3.8.1, inadvertently introduced a behavior change
57+
(PR 16839) included in 3.8.1, inadvertently introduced a behavior change
5858
that broke several third-party packages relying on the original undefined
5959
parsing behavior. The change is reverted in 3.8.2, restoring the behavior of
6060
3.8.0 and earlier releases.

0 commit comments

Comments
 (0)