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

hatch publish fails due to license metadata error #1819

Closed
dholzmueller opened this issue Nov 23, 2024 · 2 comments
Closed

hatch publish fails due to license metadata error #1819

dholzmueller opened this issue Nov 23, 2024 · 2 comments

Comments

@dholzmueller
Copy link

After running hatch publish -r main on a project where it previously worked, I am getting the following error message:

Error uploading to repository: https://upload.pypi.org/legacy/ - Client error '400 license-file introduced in metadata version 2.4, not 2.3. See https://packaging.python.org/specifications/core-metadata for more information.' for url 'https://upload.pypi.org/legacy/'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400

Depending on whether I include only the license field or only the license spec in classifiers, the error message may refer to license-expression instead of license-file.

I am using hatch version 1.13.0 (and previously tried it with 1.12, I think).

From a bit of googling, it seems that metadata version 2.4 is not even out and perhaps PyPI started checking the metadata specs more carefully recently? Until 2.3, the license field should be used instead: https://packaging.python.org/en/latest/specifications/core-metadata/#license

@ofek
Copy link
Collaborator

ofek commented Nov 23, 2024

#1818 (comment)

@dholzmueller
Copy link
Author

Thank you, the answer from the other issue fixed it! I forgot to include closed issues in the search...

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

No branches or pull requests

2 participants