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

Support PEP 639 #70

Closed
iudeen opened this issue Oct 27, 2022 · 3 comments · Fixed by #210
Closed

Support PEP 639 #70

iudeen opened this issue Oct 27, 2022 · 3 comments · Fixed by #210

Comments

@iudeen
Copy link

iudeen commented Oct 27, 2022

As per latest PEP0639 deprecates subkeys in license - https://peps.python.org/pep-0639/#deprecate-license-key-table-subkeys

This causes the following error in projects that adopted the new standard. (Especially the ones that adopted Hatch)

$ validate-pyproject pyproject.toml                          
Invalid file: pyproject.toml
[ERROR] `project.license` must be valid exactly by one definition (2 matches found):

    - keys:
        'file': {type: string}
      required: ['file']
    - keys:
        'text': {type: string}
      required: ['text']

As per PEP document:

Table values for the license key in the [project] table, including the text and file table subkeys, are now deprecated. If the new license-files key is present, build tools MUST raise an error if the license key is defined and has a value other than a single top-level string.

@abravalheri
Copy link
Owner

Hi @iudeen thank you very much for reporting this.

The status of PEP 639 is still Draft, so the new format is still not a standard.

@iudeen
Copy link
Author

iudeen commented Oct 27, 2022

Hey! Thanks, yes I just went through the discord discussions. Seems like it's delayed because of a Moon launch 😅

@henryiii
Copy link
Collaborator

This is provisionally accepted, so it's time to implement, I think. It would be great if we could also do validation on the license specifiers. Maybe even have a strict mode that validates that they are already normalized (maybe combined with #179?)

@henryiii henryiii removed the postponed Waiting for an update in dependencies or different parts of the project. label Oct 11, 2024
@henryiii henryiii changed the title License Validation uses older standard Support PEP 639 Oct 11, 2024
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 a pull request may close this issue.

3 participants