[英]Why is Twine 1.9.1 still uploading to legacy PyPi?
I want to upload packages to pypi.org as mentioned in the Migrating to PyPI.org documentation, but Twine uploads to https://upload.pypi.org/legacy/
.我想将包上传到 pypi.org,如迁移到 PyPI.org文档中所述,但 Twine 上传到
https://upload.pypi.org/legacy/
。
It's available on pypi.python.org/pypi/mypolr , but is not found on pypi.org .它在pypi.python.org/pypi/mypolr上可用,但在pypi.org上找不到。
I've tried to read several other questions, tutorials, and guides.我尝试阅读其他几个问题、教程和指南。
My pip.ini-file (I'm on Windows 10) looks like this:我的 pip.ini 文件(我使用的是 Windows 10)如下所示:
[distutils]
index-servers =
pypi
[pypi]
I don't have my username or password stored, so the [pypi] section is empty (as mentioned in migration docs).我没有存储我的用户名或密码,所以 [pypi] 部分是空的(如迁移文档中所述)。
I've put the .ini-file in my user folder, and confirmed ( per this answer ) that it's actually using the one I've set (using environment variable PIP_CONFIG_FILE
).我已将 .ini 文件放在我的用户文件夹中,并确认( 根据此答案)它实际上使用的是我设置的文件(使用环境变量
PIP_CONFIG_FILE
)。
Afraid that I had got something wrong, I also tried without a pip.ini-file to make Twine use its defaults.害怕我做错了什么,我也尝试在没有 pip.ini 文件的情况下让 Twine 使用它的默认值。
I'm using Python 3.6.3 (from Anaconda), and my tools' versions are:我使用的是 Python 3.6.3(来自 Anaconda),我的工具版本是:
Whether or not it's relevant, here is some more info:无论是否相关,以下是更多信息:
setup
is imported from setuptools
and not distutils.core
setup
是从setuptools
而不是distutils.core
导入的long description
, but in the PyPi page only first 8 asterix of header is shown. long description
,但在PyPi 页面中仅显示标题的前 8 个星号。 (Compare this with this ) setuptools_scm
is used to fetch versions from git tags setuptools_scm
用于从 git 标签中获取版本python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel
Please let me know if there is any other information that could be useful to figure this out.请让我知道是否有任何其他信息可能有助于解决这个问题。
You appear to be doing everything correctly.你似乎做的一切都是正确的。 Twine is not uploading via legacy PyPI ( https://pypi.python.org ).
Twine 不通过旧版 PyPI ( https://pypi.python.org ) 上传。 It is uploading to the new PyPI ( https://pypi.org , aka "Warehouse") via the original (and so far only) PyPI API, and this API just happens to be named "legacy".
它正在通过原始(目前仅是)PyPI API 上传到新的 PyPI( https://pypi.org ,又名“仓库”),而这个 API 恰好被命名为“遗留”。
Also, your package is present on Warehouse at https://pypi.org/project/mypolr/ ;此外,您的包存在于 Warehouse 的https://pypi.org/project/mypolr/ 上; Warehouse search is apparently not production-ready.
仓库搜索显然不是生产就绪的。
The docs for Warehouse explain this confusing nomenclature. Warehouse 的文档解释了这种令人困惑的命名法。 Quotes below are from the front page and from the page about the Legacy API :
下面的引文来自首页和关于Legacy API的页面:
Warehouse is a web application that implements the canonical Python package index (repository) ;
Warehouse 是一个Web 应用程序,它实现了规范的Python 包索引(存储库) ; its production deployment is PyPI .
它的生产部署是PyPI 。 It replaces an older code base that powered pypi.python.org.
它取代了支持 pypi.python.org 的旧代码库。
Legacy API
传统 API
The “Legacy API” provides feature parity with pypi-legacy , hence the term “legacy”.
“Legacy API”提供与pypi-legacy 相同的功能,因此称为“legacy”。
...
...
Upload API
上传接口
The API endpoint served at upload.pypi.org/legacy/ is Warehouse's emulation of the legacy PyPI upload API.
在 upload.pypi.org/legacy/ 上提供的 API 端点是 Warehouse 对旧 PyPI 上传 API 的模拟。 This is the endpoint that tools such as twine and distutils use to upload distributions to PyPI .
这是twine和distutils等工具用于 将分发上传到 PyPI的端点。
In other words, as I understand it:换句话说,据我了解:
/legacy
, a naming choice which again reflects the fact that it is a (partial) reimplementation of the endpoint used for uploads in pypi-legacy ./legacy
,命名选择再次反映了这样一个事实,即它是pypi-legacy 中用于上传的端点的(部分)重新实现。 This all seems more confusing than it needs to be, but it is what it is.这一切似乎比它需要的更令人困惑,但事实就是如此。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.