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

Fix license metadata to follow PEP 621 #3326

Merged
merged 1 commit into from
Oct 10, 2022
Merged

Conversation

amyreese
Copy link
Contributor

Description

PEP 621 requires the license field to be a table with either a file or text key: https://peps.python.org/pep-0621/#license

The current value of license = "MIT" is not PEP 621 compliant, even though hatchling allows it.

@amyreese
Copy link
Contributor Author

I would imagine this is not worthy of a changelog entry?

@github-actions
Copy link

github-actions bot commented Oct 10, 2022

diff-shades reports zero changes comparing this PR (16bea05) to main (b60b85b).


What is this? | Workflow run | diff-shades documentation

@ichard26 ichard26 added C: packaging Installation and packaging of Black skip news Pull requests that don't need a changelog entry. labels Oct 10, 2022
Copy link
Collaborator

@ichard26 ichard26 left a comment

Choose a reason for hiding this comment

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

Good catch! Feel free to add yourself to the AUTHORS list :)

pyproject.toml Outdated Show resolved Hide resolved
@amyreese
Copy link
Contributor Author

Fixed formatting and updated authors list. :)

@cooperlees cooperlees merged commit d923945 into psf:main Oct 10, 2022
@amyreese amyreese deleted the patch-1 branch October 11, 2022 02:02
@hynek
Copy link
Contributor

hynek commented Oct 11, 2022

JFTR, a plain SPDX id is part of the hopefully as-good-as-passed PEP 639 that Hatch already implements.

Technically, the new metadata is wrong-ish, because it’s supposed to be the license, not the license ID. That’s not very useful tho (and clutters the PyPI view), so nobody does it (including myself) and hence PEP 639.

All that to say: this should be reverted once PEP 639 passes. ;)

@amyreese
Copy link
Contributor Author

JFTR, a plain SPDX id is part of the hopefully as-good-as-passed PEP 639 that Hatch already implements.

Neat! When that gets accepted, will PEP621 get updated with the new information, or at least a link to PEP639?

All that to say: this should be reverted once PEP 639 passes. ;)

I agree with this sentiment, however, I originally found this because some of our tooling supporting PEP 621 was broken by this metadata. It would be nice to at least give some amount of time for tooling to catch up to PEP 639 before adopting that new format. 😅

@hynek
Copy link
Contributor

hynek commented Oct 12, 2022

JFTR, a plain SPDX id is part of the hopefully as-good-as-passed PEP 639 that Hatch already implements.

Neat! When that gets accepted, will PEP621 get updated with the new information, or at least a link to PEP639?

One would hope! Currently it does refer to it in nebulous terms:

A practical string value for the license key has been purposefully left out to allow for a future PEP to specify support for SPDX expressions (the same logic applies to any sort of “type” field specifying what license the file or text represents).

All that to say: this should be reverted once PEP 639 passes. ;)
I agree with this sentiment, however, I originally found this because some of our tooling supporting PEP 621 was broken by this metadata. It would be nice to at least give some amount of time for tooling to catch up to PEP 639 before adopting that new format. 😅

Yeah my editor is unhappy too. The Python packaging construction site keeps giving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: packaging Installation and packaging of Black skip news Pull requests that don't need a changelog entry.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants