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).
After running
hatch publish -r main
on a project where it previously worked, I am getting the following error message:Depending on whether I include only the
license
field or only the license spec inclassifiers
, the error message may refer tolicense-expression
instead oflicense-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