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
However, some projects do not define the author and up until Sphinx 7.1.1 this was an input that successfully generated the pages: copyright = "2012-2023"
For environments where SOURCE_DATE_EPOCH is not set, which is possibly the most often encountered use case, this still works. The value of the copyright key is taken in the exact form as it's defined in conf.py.
If SOURCE_DATE_EPOCH is set the value read from conf.py is processed via the logic introduced here: 8452300
Producing:
Extension error (sphinx.config):
Handler <function correct_copyright_year at 0x77f66be49080> for event 'config-inited' threw an exception (exception: string index out of range)
This behavior is inconsistent.
How to Reproduce
change tests/roots/test-copyright-multiline/conf.py to:
We make a direct array index access to copyright_line[9], that in the example provided (2012-2023) is outside-of-range.
Personally I don't love automatically rewriting copyright entries; but we shouldn't break existing documentation builds, so I have a fix coming up for this.
Describe the bug
Docs say the copyright comes with a form of: '2008, Author Name'.
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-copyright
However, some projects do not define the author and up until Sphinx 7.1.1 this was an input that successfully generated the pages: copyright = "2012-2023"
For environments where SOURCE_DATE_EPOCH is not set, which is possibly the most often encountered use case, this still works. The value of the copyright key is taken in the exact form as it's defined in conf.py.
If SOURCE_DATE_EPOCH is set the value read from conf.py is processed via the logic introduced here: 8452300
Producing:
This behavior is inconsistent.
How to Reproduce
change tests/roots/test-copyright-multiline/conf.py to:
Run tox tests.
Test without SOURCE_DATE_EPOCH set will pass while the ones with it will fail.
Environment Information
Sphinx extensions
No response
Additional context
Very similar issue #11627
Project using the '2012-2023' format https://github.com/Flask-Middleware/flask-security https://github.com/Flask-Middleware/flask-security/blob/5.3.3/docs/conf.py#L53
The text was updated successfully, but these errors were encountered: