You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SOURCE_DATE_EPOCH overwriting user specification #13231
In PR #12516 changes were made to replace the Copyright date specified via the copyright variable in conf.py with a SOURCE_DATE_EPOCH setting.
This is not specified in the documentation anywhere, requiring code spelunking to determine why this is happening (esp. for build platforms where SOURCE_DATE_EPOCH is set to an unexpected value (this seems to be auto-set in some CI runner environments, yet not to a useful value).
This replacement is done whether the user specified the copyright date manually or if they use the %Y substitution requesting the system provide the copyright. It seems wrong to override a user's explicit setting of the copyright date, and I would suggest that the SOURCE_DATE_EPOCH correction only be performed if the user specified the %Y substitution.
Please can you confirm that this changed in Sphinx 8.1? The first version of the SOURCE_DATE_EPOCH copyright substitution appears in Sphinx 1.4, from 2016 (7a89015).
I realise we don't document SOURCE_DATE_EPOCH, and this should improve. Would you be willing to suggest wording, or open a PR?
The '%Y' substitution is very new, I only added it in #12910 (first appearing in Sphinx 8.1). Perhaps we could change behaviour, but we must consider backward compatibility in any change.
Activity
AA-Turner commentedon Jan 10, 2025
Hi Kevin,
Please can you confirm that this changed in Sphinx 8.1? The first version of the
SOURCE_DATE_EPOCHcopyright substitution appears in Sphinx 1.4, from 2016 (7a89015).I realise we don't document
SOURCE_DATE_EPOCH, and this should improve. Would you be willing to suggest wording, or open a PR?The
'%Y'substitution is very new, I only added it in #12910 (first appearing in Sphinx 8.1). Perhaps we could change behaviour, but we must consider backward compatibility in any change.A