8000 gh-92448: Update the documentation builder to render the GitHub issue. by corona10 · Pull Request #92449 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-92448: Update the documentation builder to render the GitHub issue. #92449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 8, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/tools/extensions/pyspecific.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def run(self):
# Support for including Misc/NEWS

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


Expand All @@ -456,9 +457,9 @@ def run(self):
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:]
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ result from ``entry_points()`` as deprecated.

..

.. bpo: 47383
.. gh: 47383
.. date: 2021-04-08-19-32-26
.. nonce: YI1hdL
.. section: Library
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.11.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ planned). Patch by Alex Waygood.

..

.. bpo: 78157
.. gh: 78157
.. date: 2022-05-05-20-40-45
.. nonce: IA_9na
.. section: Library
Expand Down Expand Up @@ -1288,7 +1288,7 @@ Deprecate the chunk module.

..

.. bpo: 91498
.. gh: 91498
.. date: 2022-04-10-08-39-44
.. nonce: 8oII92
.. section: Library
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.7.0a3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ by Nir Soffer.

..

.. bpo: 321010
.. bpo: 32101
.. date: 2017-11-29-00-42-47
.. nonce: -axD5l
.. section: Library
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.8.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).

..

Expand Down
0