File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,8 @@ def run(self):
391
391
392
392
# Support for including Misc/NEWS
393
393
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 )
395
396
whatsnew_re = re .compile (r"(?im)^what's new in (.*?)\??$" )
396
397
397
398
@@ -418,9 +419,9 @@ def run(self):
418
419
text = 'The NEWS file is not available.'
419
420
node = nodes .strong (text , text )
420
421
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 )
424
425
content = whatsnew_re .sub (r'\1' , content )
425
426
# remove first 3 lines as they are the main heading
426
427
lines = ['.. default-role:: obj' , '' ] + content .splitlines ()[3 :]
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ by Nir Soffer.
288
288
289
289
..
290
290
291
- .. bpo: 321010
291
+ .. bpo: 32101
292
292
.. date: 2017-11-29-00-42-47
293
293
.. nonce: -axD5l
294
294
.. section: Library
Original file line number Diff line number Diff line change @@ -4617,7 +4617,7 @@ Based on patch by c-fos.
4617
4617
.. section: Library
4618
4618
4619
4619
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).
4621
4621
4622
4622
..
4623
4623
Original file line number Diff line number Diff line change @@ -1335,7 +1335,7 @@ module on POSIX systems.
1335
1335
.. nonce: 9TWMlz
1336
1336
.. section: Library
1337
1337
1338
- Revert GH- 15522, which introduces a regression in
1338
+ Revert PR 15522, which introduces a regression in
1339
1339
:meth: `mimetypes.guess_type ` due to improper handling of filenames as urls.
1340
1340
1341
1341
..
You can’t perform that action at this time.
0 commit comments