Update a PyPI package

别说谁变了你拦得住时间么 提交于 2019-12-03 09:31:16

When you encountered a bug, always upload a new release.

Increase the version number, include a changelog, call it a brown-bag release (it wasn't me, it was someone wearing a brown bag over their heads, really, honestly).

You never know whom already may have downloaded a copy of the release (on a mirror, directly from your github page, whatever) that will never know that you fixed a bug quietly. Moreover, those that did figure out you replaced the release, now have to learn how to force a reinstall.

Don't replace a released package with a silent bugfix. Do not be tempted. Just make a new release.

If, on the other hand, you managed somehow to corrupt the distribution file itself, so the .zip or .tar.gz file is b0rken, then you need to manually remove the file using the PyPI web interface and re-upload.

As of the 24th of January, PyPI will not even let you reuse a filename anymore; that means that you cannot re-upload a new file with the same version number.

If all you did wrong was a packaging error, you can add a .postN postfix to the version number (so .post1, .post2, etc.) to indicate a post-release update.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!