Repository navigation
Conversation
This was referenced Oct 24, 2026
This branch has not been deployed
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Hej,
as requested by @AA-Turner, here is the second of 3 more reviewable split up of the main PR #14770 targeting the
SOURCE_DATE_EPOCHbehavior and related fixes.Date substitutions are resolved while documents are read and remain in cached doctrees. Changing
SOURCE_DATE_EPOCHbetween builds can therefore leave old dates in the output. This change stores the effective epoch in the build environment and triggers a reread when it changes, including when it is set or unset. Equivalent inputs, such as0and00, do not cause an unnecessary reread.There is also a selected-file build issue: a global configuration change can cause all documents to be reread, while output is written only for the selected documents. The updated environment then leaves other output files stale. Selected-file builds now take the full-build path when read-affecting configuration, the extension list, or the effective epoch changes. Without a global change, selected-file builds remain selective. If none of the selected filenames are valid, existing warnings are retained and pending invalidation is preserved.
The tests use Sphinx's existing
|today|substitution, so this part can be reviewed and merged before the Docutils compatibility changes. Coverage includes clean and incremental builds, serial and parallel execution, selected output, invalid filename selections, and recovery after a failed build. The change also updates the environment version, regenerates the search fixtures throughutils/generate_js_fixtures.py, and includes documentation and a changelog entry.References
AI Disclosure
OpenAI Codex assisted with splitting up #14770. All AI-assisted work was reviewed and understood by me.