gh-155095: Fix docs changes builder for our custom directives - #155100
Conversation
|
Little ping @hugovk :-) |
hugovk
left a comment
There was a problem hiding this comment.
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.
Since it's only a few seconds, I think that's reasonable. Although I doubt many people use this feature. |
Documentation build overview
126 files changed ·
|
|
Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Sorry, @StanFromIreland, I could not cleanly backport this to |
|
Sorry, @StanFromIreland, I could not cleanly backport this to |
|
GH-157357 is a backport of this pull request to the 3.14 branch. |
|
Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-157359 is a backport of this pull request to the 3.15 branch. |
We need to extend
ChangesBuilder'stypemapwith entries for our customsoft-deprecatedanddeprecated-removeddirectives (the latter was accidentally ignored). We need a little helper,_fixup_changesetas 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 fordeprecated-removedso 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
hltextto be derived from fromtypemap), 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.make changes#155095