pypa / hatch

Modern, extensible Python project management
https://hatch.pypa.io/latest/
MIT License
6.11k stars 309 forks source link

400 response, no error message #1786

Closed ernimd closed 2 weeks ago

ernimd commented 3 weeks ago
failed
Error uploading to repository: https://test.pypi.org/legacy/ - Client error '400 Bad Request' for url 'https://test.pypi.org/legacy/'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400

just get this trying to upload to test pypi, twine works fine... : ' (

sjayjam commented 3 weeks ago

I'm getting a related error when attempting to publish to pypi today: failed Error uploading to repository: https://upload.pypi.org/legacy/ - Client error '400 license-expression 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

updating the the METADATA file to 'version 2.4' did not resolve it.

ofek commented 3 weeks ago

I'm looking into this, will be fixed by the end of the day

afourney commented 2 weeks ago

Any update on this? I'm getting the same problem.

ofek commented 2 weeks ago

Working on this today

afourney commented 2 weeks ago

I see that this is patched. I've installed hatchling and hatch from a fresh pull from git, but I'm still getting the error. What's the correct way to get this update?

hatch --version reports "Hatch, version 1.12.1.dev29"

ofek commented 2 weeks ago

There has not yet been a release, working on that still

afourney commented 2 weeks ago

Is there any mitigation or workaround presently? This is preventing me from publishing some updates to packages.

ofek commented 2 weeks ago

The new release of Hatchling is out now https://github.com/pypa/hatch/releases/tag/hatchling-v1.26.0

ernimd commented 2 weeks ago

@ofek this is still an issue with the new release...

ofek commented 2 weeks ago

The error from @sjayjam is definitely fixed if you use the latest version of Hatchling. Is your issue unrelated to that?

treyhunner commented 2 weeks ago

This may be a separate error, but this is what I'm still experiencing on the latest version (the package, in case it's helpful):

$ hatch publish
dist/strptime_cli-0.2.0.tar.gz ... failed
Error uploading to repository: https://upload.pypi.org/legacy/ - Client error '400 license-expression 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

I did a pipx uninstall hatch and pipx install hatch to make sure I got the latest version.

My version:

$ hatch --version
Hatch, version 1.13.0
ofek commented 2 weeks ago

You would have to clear the pip cache or require hatchling>=1.26.1 in your build config.

treyhunner commented 2 weeks ago

You would have to clear the pip cache or require hatchling>=1.26.1 in your build config.

That worked for me. Thanks!

ernimd commented 2 weeks ago

Seems to be solved !