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
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.
How to Reproduce
In conf.py, set copyright = '2024, me'
export SOURCE_DATE_EPOCH=1
run sphinx build and inspect the footer
Environment Information
Latest Sphinx, SOURCE_DATE_EPOCH=1
The text was updated successfully, but these errors were encountered:
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.
Describe the bug
In PR #12516 changes were made to replace the Copyright date specified via the
copyright
variable inconf.py
with aSOURCE_DATE_EPOCH
setting.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).%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 theSOURCE_DATE_EPOCH
correction only be performed if the user specified the%Y
substitution.How to Reproduce
conf.py
, setcopyright = '2024, me'
export SOURCE_DATE_EPOCH=1
Environment Information
Latest Sphinx,
SOURCE_DATE_EPOCH=1
The text was updated successfully, but these errors were encountered: