mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.9] gh-92448: Update the documentation builder to render the GitHub issue. (GH-92449). (GH-92458)
This commit is contained in:
parent
4a2337fe33
commit
480234488c
4 changed files with 8 additions and 7 deletions
|
|
@ -391,7 +391,8 @@ class DeprecatedRemoved(Directive):
|
|||
|
||||
# Support for including Misc/NEWS
|
||||
|
||||
issue_re = re.compile('(?:[Ii]ssue #|bpo-)([0-9]+)')
|
||||
issue_re = re.compile('(?:[Ii]ssue #|bpo-)([0-9]+)', re.I)
|
||||
gh_issue_re = re.compile('(?:gh-issue-|gh-)([0-9]+)', re.I)
|
||||
whatsnew_re = re.compile(r"(?im)^what's new in (.*?)\??$")
|
||||
|
||||
|
||||
|
|
@ -418,9 +419,9 @@ class MiscNews(Directive):
|
|||
text = 'The NEWS file is not available.'
|
||||
node = nodes.strong(text, text)
|
||||
return [node]
|
||||
content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/'
|
||||
r'issue?@action=redirect&bpo=\1>`__',
|
||||
content)
|
||||
content = issue_re.sub(r':issue:`\1`', content)
|
||||
# Fallback handling for the GitHub issue
|
||||
content = gh_issue_re.sub(r':gh:`\1`', content)
|
||||
content = whatsnew_re.sub(r'\1', content)
|
||||
# remove first 3 lines as they are the main heading
|
||||
lines = ['.. default-role:: obj', ''] + content.splitlines()[3:]
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ by Nir Soffer.
|
|||
|
||||
..
|
||||
|
||||
.. bpo: 321010
|
||||
.. bpo: 32101
|
||||
.. date: 2017-11-29-00-42-47
|
||||
.. nonce: -axD5l
|
||||
.. section: Library
|
||||
|
|
|
|||
|
|
@ -4617,7 +4617,7 @@ Based on patch by c-fos.
|
|||
.. section: Library
|
||||
|
||||
Remove HMAC default to md5 marked for removal in 3.8 (removal originally
|
||||
planned in 3.6, bump to 3.8 in gh-7062).
|
||||
planned in 3.6, bump to 3.8 in PR 7062).
|
||||
|
||||
..
|
||||
|
||||
|
|
|
|||
|
|
@ -1335,7 +1335,7 @@ module on POSIX systems.
|
|||
.. nonce: 9TWMlz
|
||||
.. section: Library
|
||||
|
||||
Revert GH-15522, which introduces a regression in
|
||||
Revert PR 15522, which introduces a regression in
|
||||
:meth:`mimetypes.guess_type` due to improper handling of filenames as urls.
|
||||
|
||||
..
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue