Skip to content

Fix license metadata to follow PEP 621 - #3326

Merged
cooperlees merged 1 commit into
psf:mainfrom
amyreese:patch-1
Oct 10, 2022
Merged

Fix license metadata to follow PEP 621#3326
cooperlees merged 1 commit into
psf:mainfrom
amyreese:patch-1

Conversation

@amyreese

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@github-actions

github-actionsBot commented Oct 10, 2022

Copy link
Copy Markdown
Contributor

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


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

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

@ichard26ichard26 left a comment

Copy link
Copy Markdown
Collaborator

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 :)

Comment threadpyproject.toml Outdated
@amyreese

Copy link
Copy Markdown
ContributorAuthor

Fixed formatting and updated authors list. :)

@cooperlees
cooperlees merged commit d923945 into psf:mainOct 10, 2022
@amyreese
amyreese deleted the patch-1 branch October 11, 2022 02:02
@hynek

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Contributor

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: packagingInstallation and packaging of Blackci: skip newsPull requests that don't need a changelog entry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@amyreese@hynek@ichard26@cooperlees