Skip to content

Rely on SPDX identifier for license #4975

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 5 commits into from
May 3, 2025
Merged

Rely on SPDX identifier for license #4975

merged 5 commits into from
May 3, 2025

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented May 3, 2025

Summary of changes

Closes #4956

Pull Request Checklist

@jaraco jaraco merged commit 5061e67 into main May 3, 2025
39 of 42 checks passed
@jaraco jaraco deleted the feature/skeleton-171 branch May 3, 2025 08:55
@abravalheri
Copy link
Contributor

abravalheri commented May 3, 2025

There is a (mildly heated) debate in https://discuss.python.org/t/split-from-pep-639-expressing-project-vs-distribution-licenses-post-pep-639-mod-titled/90314 regarding the vendoring use case and the license expressions.

According to that discussion the license field in the metadata is meant to also include the license of all vendors artifacts1.

This means that for setuptools it would have to be something in the shape of MIT AND ... AND ... AND ... we're all the licenses are joined in a logic expression.

Because we don't have any tool in the ecosystem yet to calculate that automatically that we can add to the vendoring script, this would add maintenance burden, because we would need to manually craft or at least verify the license expression every time we update the vendored dependencies).

I mentioned in the thread two different approaches that we could follow (and no one said they would be "wrong" so far):

  1. Simply don't include the license expressions. We already ship of the license files, so licensing information is available and we are respecting the licensing conditions. (This is the approach pip maintainers are tempted to follow).
  2. We use a custom valid, but vague license expression like: MIT AND LicenseRef-Others or MIT AND LicenseRef-Vendored-Dependencies or LicenseRef-Core-MIT

This is currently a limitation of the standard (it covers simple projects but edge cases that involve vendoring are not easy to deal with).

@jaraco do you have thoughts on it?

Footnotes

  1. Comments of the main PEP editors: https://discuss.python.org/t/split-from-pep-639-expressing-project-vs-distribution-licenses-post-pep-639-mod-titled/90314/93 , https://discuss.python.org/t/split-from-pep-639-expressing-project-vs-distribution-licenses-post-pep-639-mod-titled/90314/94

@jaraco
Copy link
Member Author

jaraco commented May 4, 2025

My opinion - it's a lot of hand wringing over nothing. I don't have time to read, much less synthesize that long conversation. Paul makes a good point that the current system is unable to accurately and generally reflect the truth of the matter (what licenses are applicable for which lines of code). It's already enough overhead to deal with multiple declarations of potentially inconsistent license declarations in simple projects without vendored dependencies, I am strongly opposed to creating mashups of entangled licenses.

The industry has already accepted that licenses don't need to be included in every file and that copyrights don't need to be included in every file and every license. Let's just do our best to communicate the truth of the matter, that Setuptools is licensed as MIT, the copyrights are implied, and vendored packages are licensed per their project licenses. If someone needs clarity, we can do that out of band, but let's keep the SPDX identifier clean and straightforward and not confuse matters by blending them together. If they want to insist that vendoring a package requires somehow absorbing their license, that's going to be enough motivation to just remove the vendored packages (which incidentally, I'm getting close to having a technique that may unlock that without breaking bootstrapping).

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

Successfully merging this pull request may close these issues.

[Docs] PyPI Meta tags no longer include license
2 participants