将新版本上传到 TestPyPi [英] Upload a new release to TestPyPi

查看:81
本文介绍了将新版本上传到 TestPyPi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tl;dr - 如何将新版本上传到 TestPyPi 项目?

tl;dr - How do I upload a new release to a TestPyPi project?

说明:我遵循了这些说明将测试包导入到 TestPyPi 的 Python 包用户指南.但是,我上传的包有错误.我更正了错误并尝试覆盖包,但遇到以下错误:

Description: I followed these instructions in the Python Package User Guide to import a test package to TestPyPi. However, the package I uploaded has an error. I corrected the error and tried to overwrite the package, but encountered the following error:

代码:

python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

错误:

HTTPError: 400 Client Error: File already exists. See https://test.pypi.org/help/#file-name-reuse for url: https://test.pypi.org/legacy/

关于堆栈溢出,我发现一篇文章指出 TestPyPi 包 不能被覆盖.但是,TestPyPi 本身表明版本发布应该是可能的.

On stack overflow, I found a post stating that a TestPyPi package cannot be overwritten. However, TestPyPi itself indicates that version release should be possible.

当我在 TestPyPi 中搜索文档时,我找不到任何说明如何上传新版本包的内容.在一个区域,我找到了一个关于发布管理的简要参考,但它是一个链接到如何安装包的说明的超链接,而不是更新一个(这与我在这篇文章的第一句话中引用的超链接相同).

When I searched TestPyPi for documentation, I cannot find anything stating how to upload a new version of a package. In one area I found a brief reference to release management, but it is a hyperlink that links to the instructions on how to install a package, not update one (this is the same hyperlink I referenced in the first sentence of this post).

如何将新版本上传到 TestPyPi 项目?

How do I upload a new release to a TestPyPi project?

推荐答案

TestPyPI 甚至 PyPI 本身都有重用文件名的能力.但是在切换到 Warehouse(PyPI 和 TestPyPI 背后的新代码)后,他们失去了这种能力.无法重新上传相同的文件名.

TestPyPI and even PyPI itself have had ability to reuse filenames. But after switching to Warehouse (the new code behind PyPI and TestPyPI) they lost that ability. There is no way to reupload the same filename.

增加版本、重新生成包并上传具有新名称的新包.

Increase version, regenerate packages and upload new packages with new names.

这篇关于将新版本上传到 TestPyPi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆