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

Remove copyright years from source files #1325

Closed
benhoyt opened this issue Aug 21, 2024 · 3 comments · Fixed by #1326
Closed

Remove copyright years from source files #1325

benhoyt opened this issue Aug 21, 2024 · 3 comments · Fixed by #1326
Assignees

Comments

@benhoyt
Copy link
Collaborator

benhoyt commented Aug 21, 2024

Per team discussion, we're going to remove the copyright year (or year range in some cases) from the top of each source file, but leave the copyright notice itself, so the first line just says # Copyright Canonical Ltd..

This blog post notes that various large projects and companies have started doing this (curl, React, Amazon), so there's a good precedent.

As mentioned in the [Curl commit])(curl/curl@2bc1d77), there's no legal need:

  • they are mostly pointless in all major jurisdictions
  • many big corporations and projects already don't use them
  • saves us from pointless churn
  • git keeps history for us
@tonyandrewmeyer
Copy link
Contributor

FYI, this is the ruff rule I mentioned. I have the feeling we may need to turn it off, because the regex expects a year and can't be customised in ruff. Not 100% sure on that, though.

@benhoyt
Copy link
Collaborator Author

benhoyt commented Aug 21, 2024

Hmm, apparently our legal team recommends keeping just the creation year. And as @james-garner-canonical found, the appendix in the Apache license says to use the format "Copyright [yyyy] [name of copyright owner]" with the year. Oh well, let's be safe and change all the files to just the year the file was created (and no ranges).

@james-garner-canonical
Copy link
Contributor

I've standardised the copyright headers to use just creation year, and to always include the full boilerplate from LICENSE.txt

There should be no issues with ruff, as copyright notices with a single year always passed linting.

Note that it looks like docs generation automatically uses just the year, e.g. "Copyright 224 Canonical Ltd." (see docs/custom_conf.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants