8000 GH-121970: Extract ``misc_news`` into a new extension by AA-Turner · Pull Request #129577 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-121970: Extract misc_news into a new extension #129577

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 3 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Bénédikt's comments
  • Loading branch information
AA-Turner committed Feb 2, 2025
commit 6f3cb21235c41042759d3fc664b4c5e5b2007c05
8 changes: 4 additions & 4 deletions Doc/tools/extensions/misc_news.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from sphinx.util.typing import ExtensionMetadata


issue_re: Final[re.Pattern[str]] = re.compile(
"(?:[Ii]ssue #|bpo-)([0-9]+)", re.ASCII | re.IGNORECASE
bpo_issue_re: Final[re.Pattern[str]] = re.compile(
"(?:issue #|bpo-)([0-9]+)", re.ASCII
)
gh_issue_re: Final[re.Pattern[str]] = re.compile(
"gh-(?:issue-)?([0-9]+)", re.ASCII | re.IGNORECASE
Expand All @@ -43,11 +43,11 @@ def run(self) -> list[Node]:
self.env.note_dependency(news_file)
try:
news_text = news_file.read_text(encoding="utf-8")
except OSError:
except (OSError, UnicodeError):
text = sphinx_gettext("The NEWS file is not available.")
return [nodes.strong(text, text)]

news_text = issue_re.sub(r":issue:`\1`", news_text)
news_text = bpo_issue_re.sub(r":issue:`\1`", news_text)
# Fallback handling for GitHub issues
news_text = gh_issue_re.sub(r":gh:`\1`", news_text)
news_text = whatsnew_re.sub(r"\1", news_text)
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.5.3rc1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ after a commit.
.. section: Library

A new version of typing.py from https://github.com/python/typing:
Collection (only for 3.6) (Issue #27598). Add FrozenSet to __all__
Collection (only for 3.6) (issue #27598). Add FrozenSet to __all__
(upstream #261). Fix crash in _get_type_vars() (upstream #259). Remove the
dict constraint in ForwardRef._eval_type (upstream #252).

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.6.0a4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Support keyword arguments to zlib.decompress(). Patch by Xiang Zhang.
.. section: Library

Prevent segfault after interpreter re-initialization due to ref count
problem introduced in code for Issue #27038 in 3.6.0a3. Patch by Xiang
problem introduced in code for issue #27038 in 3.6.0a3. Patch by Xiang
Zhang.

..
Expand Down
8000
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.6.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ chunked transfer-encoding.
.. section: Library

A new version of typing.py from https://github.com/python/typing: -
Collection (only for 3.6) (Issue #27598) - Add FrozenSet to __all__
Collection (only for 3.6) (issue #27598) - Add FrozenSet to __all__
(upstream #261) - fix crash in _get_type_vars() (upstream #259) - Remove the
dict constraint in ForwardRef._eval_type (upstream #252)

Expand Down
Loading
0