Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix copyright date with SOURCE_DATE_EPOCH set #21724

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

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Nov 23, 2021

PR Summary

When SOURCE_DATE_EPOCH is set, then Sphinx will attempt to 'fix' the year in the copyright:
sphinx-doc/sphinx#3451 (comment)
We already correctly understand that envvar, so this is unexpected and wrong.

Sphinx looks for a 4-digit year followed by a space or two 4-digit years separated by a dash. We can fix this by using an en-dash, which is the correct typographical symbol for date ranges anyway, and thwarts Sphinx.

Fixes #20854

PR Checklist

Tests and Styling

  • [n/a] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs should build without error).

When `SOURCE_DATE_EPOCH` is set, then Sphinx will attempt to 'fix' the
year in the copyright:
sphinx-doc/sphinx#3451 (comment)
We already correctly understand that envvar, so this is unexpected and
wrong.

Sphinx looks for a 4-digit year followed by a space or two 4-digit years
separated by a dash. We can fix this by using an en-dash, which is the
correct typographical symbol for date ranges anyway, and thwarts Sphinx.

Fixes matplotlib#20854
@QuLogic QuLogic added this to the v3.6.0 milestone Nov 23, 2021
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Ha, sounds a bit fragile, but OK.

Is there a reason we maintain a range of dates like this, and oldest first? Is it really pertinent who held the original copyright? If we want to acknowledge the founding team, that could just as easily be:

'2021 Matplotlib; All rights reserved.  Matplotlib was started by John Hunter, Darren Dale, Eric Firing, Michael Droettboom in 2002'

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

ooops sorry, meant to approve....

@QuLogic
Copy link
Member Author

QuLogic commented Nov 23, 2021

I dunno; I'll leave copyright changes to the Governance people.

@jklymak
Copy link
Member

jklymak commented Nov 23, 2021

Feel free to self-merge when the docs build and the copyright looks good....

@jklymak jklymak merged commit 17fcacc into matplotlib:main Nov 23, 2021
@QuLogic QuLogic deleted the copyright-date branch November 23, 2021 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Doc]: Incorrect copyright start year at the bottom of devdocs page
2 participants