Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support placeholders for years in copyright #12910

Merged
merged 11 commits into from
Oct 4, 2024

Conversation

AA-Turner
Copy link
Member

This is a sketch of what I propose in #12519 (comment) (cc @jayaddison)

It would need tests and docs (and ideally a deprecation plan) to be merged. Opening as a starter for ten, though.

A

sphinx/config.py Outdated Show resolved Hide resolved
@@ -27,7 +26,7 @@
exclude_patterns = ['_build']

project = 'Sphinx'
copyright = f'2007-{time.strftime("%Y")}, the Sphinx developers'
copyright = '2007-%Y, the Sphinx developers'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I think we should support this templating for other projects, I have a strong preference for using constant/static copyright notices where possible (although I fully admit that adding supporting tooling to detect cases where they're out-of-date could be useful).

Given that, and the fact that we update most of the copyright notices throughout the codebase manually each year, I wonder whether we should do the same here.

Suggested change
copyright = '2007-%Y, the Sphinx developers'
copyright = '2007-2024, the Sphinx developers'

@AA-Turner AA-Turner marked this pull request as ready for review October 4, 2024 11:06
sphinx/config.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jayaddison jayaddison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks great to me, thank you again @AA-Turner!

CHANGES.rst Outdated Show resolved Hide resolved
@AA-Turner AA-Turner merged commit be52db2 into sphinx-doc:master Oct 4, 2024
22 of 23 checks passed
@AA-Turner AA-Turner deleted the copyright-placeholders branch October 4, 2024 12:52
@AA-Turner AA-Turner added this to the 8.1.x milestone Oct 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants