pypi/legacy

author_email: Invalid email address

Closed this issue · 1 comments

I can't seem to get past this error:

[root@ernie pyslurm]# twine upload --repository testpypi dist/*
Uploading distributions to https://test.pypi.org/legacy/
Uploading pyslurm-17.11.0-cp27-cp27mu-linux_x86_64.whl
HTTPError: 400 Client Error: author_email: Invalid email address. for url: https://test.pypi.org/legacy/

I certainly have a properly formatted email address for author_email in the setup() function in setup.py. I even tried multiple email addresses, but nothing seems to work.

What am I missing? Thanks.

hi @giovtorres! as confusing as it is... uploads are not handled by this codebase any longer!

your issue is better filed over at https://github.com/pypa/packaging-problems/issues/new or https://github.com/pypa/warehouse/issues/new

however! I can tell you that your email address is indeed not valid if you're still using this string:

https://github.com/PySlurm/pyslurm/blob/3d822d8ff792aeb5e2e7c142ffd7467a02709fcb/setup.py#L312

    author_email = "mark@gingergeeks co uk",

as we do validate the author and maintainer fields for real (looking) email addresses:

https://github.com/pypa/warehouse/blob/6de17b43aa4ab4ecd82f6c9795bced1717142247/warehouse/forklift/legacy.py#L328-L343

    author = wtforms.StringField(validators=[wtforms.validators.Optional()])
    author_email = wtforms.StringField(
        validators=[
            wtforms.validators.Optional(),
            wtforms.validators.Email(),
        ],
    )
    maintainer = wtforms.StringField(
        validators=[wtforms.validators.Optional()],
    )
    maintainer_email = wtforms.StringField(
        validators=[
            wtforms.validators.Optional(),
            wtforms.validators.Email(),
        ],
    )