Search code examples
pythonpackagepypi

How does PyPI decide what is the latest version of a package?


I've recently uploaded an upgrade to a package I developed on PyPI, version 0.4.3. The next day I noticed a minor adjustment I forgot to add, and uploaded a new version, 0.4.3a0. Yet, PyPI kept marking the previous one as the latest version. What am I missing?


Solution

  • Using PEP 440, under which 0.4.3a0 is read as a pre-release (specifically, an alpha) of version 0.4.3.

    Within a numeric release (1.0, 2.7.3), the following suffixes are permitted and MUST be ordered as shown:

    .devN, aN, bN, rcN, <no suffix>, .postN
    

    Consider using version 0.4.3post1 or just 0.4.4.