flit: flit publish fails: this api is no longer supported
Running flit publish results in the following. Last time I did this, May 24 (withflit wheel --upload) it worked. I’m not sure what it means by simply upload the file.
Copying package file(s) from bowtie I-flit.wheel
Writing metadata files I-flit.wheel
Writing the record of files I-flit.wheel
Built wheel: dist/bowtie-0.4.0-py2.py3-none-any.whl I-flit.wheel
Found 62 files tracked in git I-flit.sdist
Writing generated setup.py I-flit.sdist
Built sdist: dist/bowtie-0.4.0.tar.gz I-flit.sdist
Using repository at https://upload.pypi.org/legacy/ I-flit.upload
Install keyring to store passwords securely W-flit.upload
Server : https://upload.pypi.org/legacy/
Username: jwkvam
Password:
Uploading dist/bowtie-0.4.0-py2.py3-none-any.whl... I-flit.upload
Uploading forbidden; trying to register and upload again W-flit.upload
Traceback (most recent call last):
File "/Users/jacques/miniconda/lib/python3.6/site-packages/flit/upload.py", line 256, in do_upload
upload_file(file, metadata, repo)
File "/Users/jacques/miniconda/lib/python3.6/site-packages/flit/upload.py", line 225, in upload_file
resp.raise_for_status()
File "/Users/jacques/miniconda/lib/python3.6/site-packages/requests/models.py", line 937, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jacques/miniconda/bin/flit", line 11, in <module>
sys.exit(main())
File "/Users/jacques/miniconda/lib/python3.6/site-packages/flit/__init__.py", line 123, in main
main(args.ini_file, args.repository, formats=set(args.format or []))
File "/Users/jacques/miniconda/lib/python3.6/site-packages/flit/upload.py", line 276, in main
do_upload(built.wheel.file, built.wheel.builder.metadata, repo_name)
File "/Users/jacques/miniconda/lib/python3.6/site-packages/flit/upload.py", line 262, in do_upload
register(metadata, repo)
File "/Users/jacques/miniconda/lib/python3.6/site-packages/flit/upload.py", line 237, in register
resp.raise_for_status()
File "/Users/jacques/miniconda/lib/python3.6/site-packages/requests/models.py", line 937, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 410 Client Error: This API is no longer supported, instead simply upload the file. for url: https://upload.pypi.org/legacy/
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (16 by maintainers)
I found the problem: when you entered the password in the terminal, it wouldn’t actually use it for the upload (a return was missing). It’s fixed in 0.11.3.
They’re going to stop old PyPI accepting uploads on July 3rd, so if you have
https://pypi.python.org/pypiin your .pypirc file, you’ll want to remove that or update it tohttps://upload.pypi.org/legacy/.Finally, if you install the
keyringpackage, flit will store your password in your system’s native password store, so you don’t need to type it each time. It doesn’t currently support changing the stored password, though - for now, you have to do that in whatever interface the OS provides.