FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-155095: Fix docs changes builder for our custom directives by StanFromIreland · Pull Request #155100 · python/cpython · GitHub

Repository navigation

gh-155095: Fix docs changes builder for our custom directives - #155100

Merged
StanFromIreland merged 2 commits into
python:mainfrom
StanFromIreland:changes-build-and-render
Sep 12, 2026
Merged

StanFromIreland merged 2 commits into
python:mainfrom
StanFromIreland:changes-build-and-render

Conversation

StanFromIreland commented Aug 2, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

We need to extend ChangesBuilder's typemap with entries for our custom soft-deprecated and deprecated-removed directives (the latter was accidentally ignored). We need a little helper, _fixup_changeset as the changeset text is recorded before the directive replaces the marker with a glossary reference so the soft deprecated text is rendered incorrectly (":term:`Soft deprecated` ..."). It also includes some additional handling for deprecated-removed so that deprecations and removals are indexed separately.

This does not fix the missing yellow source-line highlighting in the builder's source view, which uses a separate hard-coded directive list in Sphinx:

https://github.com/sphinx-doc/sphinx/blob/9af5b469df42c810c62453661c1974c0f254e674/sphinx/builders/changes.py#L118-L127

It should be fixed upstream (by changing hltext to be derived from from typemap), as I don't think that adding logic to inject highlighting after the view is built or re-writing the builder is worth it for this.

Copy link
Copy Markdown
Member Author

Little ping @hugovk :-)

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Shall we also add a make changes to the CI after the main docs build to ensure this keeps working in the future? It will be quick, especially after the main build.

Copy link
Copy Markdown
Member Author

Shall we also add a make changes to the CI after the main docs build to ensure this keeps working in the future?

Since it's only a few seconds, I think that's reasonable. Although I doubt many people use this feature.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34512398 | 📁 Comparing da46dc7 against main (204feba)

  🔍 Preview build  

126 files changed · + 1 added · ± 125 modified

+ Added

± Modified

StanFromIreland merged commit 94dc051 into python:main Sep 12, 2026
30 checks passed
StanFromIreland deleted the changes-build-and-render branch September 12, 2026 09:11
StanFromIreland added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Sep 12, 2026

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 94dc05133531d792fb0e14bfe12c3fe65ba3a91f 3.13

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 94dc05133531d792fb0e14bfe12c3fe65ba3a91f 3.14

bedevere-app Bot commented Sep 12, 2026

Copy link
Copy Markdown

GH-157357 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 12, 2026
StanFromIreland added needs backport to 3.15 bugs and security fixes and removed needs backport to 3.13 only security fixes labels Sep 12, 2026

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

bedevere-app Bot commented Sep 12, 2026

Copy link
Copy Markdown

GH-157359 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Sep 12, 2026
StanFromIreland added a commit that referenced this pull request Sep 12, 2026
…H-155100) (GH-157357) (#157358)

(cherry picked from commit 94dc051)

Co-authored-by: Stan Ulbrych <stan@python.org>
hugovk pushed a commit that referenced this pull request Sep 12, 2026
…H-155100) (#157359)

gh-155095: Fix docs changes builder for our custom directives (GH-155100)
(cherry picked from commit 94dc051)

Co-authored-by: Stan Ulbrych <stan@python.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL