Skip to content
This repository has been archived by the owner on May 30, 2020. It is now read-only.

Cannot use PEP 440 local versions #731

Closed
maphew opened this issue Nov 18, 2017 · 2 comments
Closed

Cannot use PEP 440 local versions #731

maphew opened this issue Nov 18, 2017 · 2 comments

Comments

@maphew
Copy link

maphew commented Nov 18, 2017

I get this error when trying to upload a package foo-5.7-dev219+16a3d7d4a.whl to pypi:

HTTPError: 400 Client Error: version: Cannot use PEP 440 local versions. for url: https://upload.pypi.org/legacy/

I worked a long time to get the build system to emit PEP440 compliant version number and package name. Is this limitation regarding local +something names something that is likely to remain? (Do I sit tight and wait awhile or just throw out that part of the package name?)

@maphew maphew changed the title HTTPError: 400 Client Error: version: Cannot use PEP 440 local versions. for url: https://upload.pypi.org/legacy/ Cannot use PEP 440 local versions. for url: https://upload.pypi.org/legacy/ Nov 18, 2017
@maphew maphew changed the title Cannot use PEP 440 local versions. for url: https://upload.pypi.org/legacy/ Cannot use PEP 440 local versions Nov 18, 2017
@dstufft
Copy link
Member

dstufft commented Nov 18, 2017

The +something namespace is explicitly disallowed on PyPI, because the primary thing they are designed to solve is to give people modifying a library a place to add their own versioning system on top of the upstream versioning, without risking namespace collision (for instance, I might modify foo 5.7 and change the version to 5.7+dstufft.fixedabug.

So you'll want to strip what appears to be the git hash out of the version number when uploading to PyPI.

@dstufft dstufft closed this as completed Nov 18, 2017
@maphew
Copy link
Author

maphew commented Nov 19, 2017

Hmm. Ok I incompletely understood the local name's purpose. I was adding the commit hash in order to unambiguously trace which part of the source the package came from.

It would be nice if pypi flagged or warned of incompatible names before upload. I burned through a couple hundred megabytes of metered bandwidth trying to understand why the package was being rejected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants