pypa / twine

Utilities for interacting with PyPI
https://twine.readthedocs.io/
Apache License 2.0
1.59k stars 305 forks source link

Bad Request - The email 'XYZ <>' is invalid #1097

Closed Toemsel closed 4 months ago

Toemsel commented 4 months ago

Is there an existing issue for this?

What keywords did you use to search existing issues?

HTTP 400 HTTPError Bad Request Email

What operating system are you using?

Windows 11

If you selected 'Other', describe your Operating System here

No response

What version of Python are you running?

3.11.2

How did you install twine? Did you use your operating system's package manager or pip or something else?

pip install twine

What version of twine do you have installed (include the complete output)

twine version 5.0.0 (importlib-metadata: 7.0.2, keyring: 24.3.1, pkginfo: 1.10.0, requests: 2.31.0, requests-toolbelt: 1.0.0, urllib3: 2.2.1)

Which package repository are you using?

DevOps

Please describe the issue that you are experiencing

Upload a folder full of .whl files with: twine upload --password XXX --username XXX --skip-existing --repository-url https://devops.XXX.YY/XXX/YY/_packaging/Feedname/pypi/upload * --verbose when the error message (for some packages) appears:

HTTPError: 400 Bad Request from https://devops.XXX.YY/XX/YY/_packaging/Feedname/pypi/upload Bad Request - The email 'Jeff Forcier <jeff@bitprophet.org>' is invalid. (DevOps Activity ID: GUID)

Although it applies to many wheels, the specific error comes from the alabaster-0.7.16-py3-none-any.whl

Please list the steps required to reproduce this behaviour

  1. Download the 0.7.16 .whl file from https://pypi.org/project/alabaster/
  2. Upload to pypi

Anything else you'd like to mention?

As already stated - but I want to emphasize - this applies to various packets. So maybe (if the issue is related to invalid metadata) should be considered in twine.

Toemsel commented 4 months ago

Addon: A package which works to upload is altgraph. The METADATA's author email looks like following

Author-email: ronaldoussoren@mac.com

On the other hand, alabaster's author email equals

Author-email: Jeff Forcier jeff@bitprophet.org

Toemsel commented 4 months ago

Addon: The Maintainer-email - if provided - also causes this issue.

sigmavirus24 commented 4 months ago

@Toemsel I don't know what "Devops" is but that is what's returning the error, not twine. Twine is merely rendering the error returned by your index server to you. And this is not a valid thing for "Devops" to complain about as the format has been the same for probably at least 20 years (since PyPI was the Cheese shop probably). So your index is broken and doing the wrong thing. Whomever you paid for it is who you need to file an issue with.