什么是测试PyPI服务器的新上传URL?
问题描述:
我想打包一个新项目并将其上传到TestPyPI服务器。由于引入了新的PyPI.org,几乎所有我发现的指令都过时了,并且试图上传到https://testpypi.python.org/pypi现在返回401 Gone
。什么是测试PyPI服务器的新上传URL?
The guide for migrating to the new PyPI.org说使用https://test.pypi.org/legacy
作为TestPyPI的存储库。然而,插入此网址时到我.pypirc
文件,并试图上传我的包,我收到以下错误:
python setup.py sdist upload -r testpypi
[...]
running upload
Submitting dist/<package_name> to https://test.pypi.org/legacy
Upload failed (404): Not Found
error: Upload failed (404): Not Found
这里是我的~/.pypirc
文件的内容:
[distutils]
index-servers =
pypi
testpypi
[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password
[testpypi]
repository: https://test.pypi.org/legacy
username: pbaranay
password: my_password