Search code examples
pythonpypi

How to handle changing the format of a PyPi version number


My project Pyrr was previously using versions that were datestamps.

The last datestamped version was:

version='20130321'

I want to move to a proper major.minor.micro format.

I've updated a new package to PyPi in this format.

version='0.1.0'

When I pip install pyrr I still get the 20130321 version.

$ yolk -V pyrr
pyrr 0.1.0

$ pip install pyrr
Downloading/unpacking pyrr
  Downloading pyrr-20130321.tar.gz
<snip>

PyPi has the over versions marked as hidden and the 0.1.0 as the only version not marked hidden.

What do I have to do to get pip / pypi to download the 0.1.0 version instead of the older datestamp versions?


Solution

  • 20130321 is the major version, which is obviously higher than 0, therefor version 20130321 is considered the latest version.

    The easiest way to fix this would be to delete the outdated version using the webinterface.

    If the older versions should still exist, you could download them and reupload them using a newer version. e.g. 0.0.20130321.

    If people depend on your package without a version, they wouldn't notice the new versioning system.

    If people do depend on a specific version, they would have to change their version dependency. This could be considered annoying, but it is inevitable and it's a small change for them.