In the documentation for packaging and distributing Python packages, it says to use twine
with repository = https://upload.pypi.org/legacy/
in .pypirc
. Now this URL is both – from the last bit of it – a legacy way to do things, and a non-existing one at that:
$ twine register dist/scriptdoctest-0.1-py2.py3-none-any.whl
Registering package to https://upload.pypi.org/legacy/
Enter your username: MyUserName
Enter your password:
Registering scriptdoctest-0.1-py2.py3-none-any.whl
HTTPError: 410 Client Error: This API is no longer supported, instead simply upload the file. for url: https://upload.pypi.org/legacy/
Is using scriptdoctest.egg-info/PKG-INFO
now the preferred and only way to register a package, or is there some other way to do this with twine
or some other CLI tool?
python setup.py upload
, which has been the conventional method for many years. – Waylan Oct 13 '16 at 13:51python setup.py upload
(or did I tryregister
only?) did also give me aHTTP 410: This API is no longer supported
. Do I just want to not have a.pypirc
at all? – Anaphory Oct 13 '16 at 16:50.pypirc
file. I've never used one myself. As I understand it (sorry no reference), they are currently in the process of updated PyPI. I'm guessing you are reading prospective documentation which isn't actually effective yet. – Waylan Oct 13 '16 at 17:18.pypirc
hasrepository=https://pypi.python.org/pypi
instead ofrepository=https://pypi.python.org/legacyi
. I was not usingtwine
and while I register my package withpython setup.py register -r pypi
, I got the sameServer response (410): This API is no longer supported, instead simply upload the file.
response. And I skipped over to usepython setup.py sdist upload -r pypi
directly. I am purely guessing here, can you try usingtwine upload dist/*
directly after changing.pypirc
? – user2829759 Feb 24 '17 at 9:15