File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,8 @@ def run(self):
390
390
391
391
# Support for including Misc/NEWS
392
392
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 )
394
395
whatsnew_re = re .compile (r"(?im)^what's new in (.*?)\??$" )
395
396
396
397
@@ -417,9 +418,9 @@ def run(self):
417
418
text = 'The NEWS file is not available.'
418
419
node = nodes .strong (text , text )
419
420
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 )
423
424
content = whatsnew_re .sub (r'\1' , content )
424
425
# remove first 3 lines as they are the main heading
425
426
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
You can’t perform that action at this time.
0 commit comments