Repository navigation
Conversation
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 third of 3 more reviewable split up of the main PR #14770 targeting the
SOURCE_DATE_EPOCHbehavior and related fixes.With Docutils versions before 1.0, Sphinx's
|today|substitution can useSOURCE_DATE_EPOCHwhile the Docutilsdatedirective still uses the system clock. Configureddatestampfooters have the same problem, and their dates remain in cached doctrees. This change adds compatibility adapters that use the supplied epoch in UTC. Docutils 1.0 retains its native implementations.The directive adapter preserves custom formats, invalid-context diagnostics, and extension overrides. The footer adapter leaves footer construction to Docutils, preserving literal percent signs, generator credits, and source links. It restores the original format setting even if footer generation fails. Unset and empty epochs retain current-time behavior, and disabled datestamps remain disabled.
The change includes tests, documentation, and a changelog entry. It extends the incremental coverage with Docutils date substitutions and XML footer output, including selected-file and parallel builds.
References
AI Disclosure
OpenAI Codex assisted with splitting up #14770. All AI-assisted work was reviewed and understood by me.