-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support for License-Expression parsing (PEP 639) #213
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #213 +/- ##
=======================================
Coverage 99.13% 99.14%
=======================================
Files 1 1
Lines 462 466 +4
=======================================
+ Hits 458 462 +4
Misses 4 4 ☔ View full report in Codecov by Sentry. |
Isn't the proposed handling against PEP 639? According to https://packaging.python.org/en/latest/specifications/core-metadata/#license, the following holds true:
With PyPI not allowing both keys to be set and |
Yeah, you're correct.
Not quite sure about that one. The breaking change is in the |
The License field is deprecated, as is the trove classifier. Note that pip show does not support properly detecting these yet, but it will. Note also that `pip-licenses` does not support PEP 639 (see raimon49/pip-licenses#213) the implications of which are that we are already broken (the `license_check` noxenv fails because of packages already using the newer standard). This doesn't fix that yet. AFAICT no tool exists that does this properly yet/now. So let's see... I guess we reimplement that functionality?! Refs: https://peps.python.org/pep-0639/ Refs: pypa/pip#13112 Refs: pypa/pip#6677
PEP 639 has been (provisionally) accepted recently.
hatch
added support1 for it early on and so the first packages which store the license metadata inside theLicense-Expression
field start popping up. E.g. for ftfy it looks like thisThis PR adds the basic parsing support without any validation similar to the existing behavior for the
License
metadata field or the classifier. It might make sense to add the validation at a later point though.To keep the changes to a minimum, the behavior of
--from=mixed
is preserved. However:Caution
Breaking change: The
--from=all
output now includes theLicense-Expression
value.Footnotes
https://hatch.pypa.io/1.9/config/metadata/#spdx-expression ↩