Skip to content

Commit

Permalink
Improve phased-out PyPI upload error message
Browse files Browse the repository at this point in the history
  • Loading branch information
brainwane committed Mar 15, 2018
1 parent 7664372 commit e2c2ec9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions twine/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,14 @@ def check_status_code(response):
if (response.status_code == 500 and
response.url.startswith(("https://pypi.python.org",
"https://testpypi.python.org"))):
print("It appears you're uploading to pypi.python.org (or testpypi) "
"you've received a 500 error response. PyPI is being phased "
"out for pypi.org. Try using https://upload.pypi.org/legacy/ "
print("It appears you're uploading to pypi.python.org (or "
"testpypi.python.org). You've received a 500 error response. "
"Uploading to those sites is deprecated. The new sites are "
"pypi.org and test.pypi.org. Try using "
"https://upload.pypi.org/legacy/ "
"(or https://test.pypi.org/legacy/) to upload your packages "
"instead. These are the default URLs for Twine now.")
"instead. These are the default URLs for Twine now. More at "
"https://packaging.python.org/guides/migrating-to-pypi-org/ ")
response.raise_for_status()


Expand Down

0 comments on commit e2c2ec9

Please sign in to comment.