Skip to content

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

Open
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:changes-build-and-render
Open

gh-155095: Fix docs changes builder for our custom directives#155100
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:changes-build-and-render

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Aug 2, 2026

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.

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.

1 participant