Share

Python Package Index

Tracker: Bugs

5 PyPI sorts "alpha"/"beta"/nothing incorrectly - ID: 1884734
Last Update: Comment added ( scoder )

PyPI doesn't sort alpha/beta versions before the final (postfix-less)
release, as you can see here:

http://pypi.python.org/pypi/lxml

Also note the incorrect "latest version" link at the top of this page, that
links from "2.0" to "2.0beta2":

http://pypi.python.org/pypi/lxml/2.0

I think PyPI should be intelligent enough to split these not-so-uncommon
postfixes from the actual version.


Stefan Behnel ( scoder ) - 2008-02-01 18:23

5

Closed

Rejected

Nobody/Anonymous

None

None

Public


Comments ( 5 )

Date: 2008-03-27 11:47
Sender: scoder


Is the supported versioning scheme documented somewhere? It would be
helpful if PyPI (and the distutils docs) would tell users how to best name
their versions to have them correctly sorted in PyPI.



Date: 2008-03-20 15:36
Sender: richardProject Admin


Version sorting is performed using distutils.version.LooseVersion. This is
not likely to change without some sort of AI :)


Date: 2008-02-14 14:44
Sender: scoder


Martin, I found at least one project that uses "a" and "b" as postfix for
*increasing* patch level version numbers. In that case, it's impossible to
distinguish them from the more common "alpha" and "beta" markers. So, now I
know what you mean with "too many different ways". I guess you're right
that there isn't really a way to do it "correctly"...


Date: 2008-02-01 20:05
Sender: scoder


I really don't think it's that hard to do. All there is to it is split
version numbers into sequences of numbers, dots and letters and compare the
resulting tuples. Done. I wouldn't even consider that worth a PEP, not even
the fine tuning that might be doable afterwards.



Date: 2008-02-01 19:36
Sender: loewisSourceForge.net DonorProject Admin


I don't think a solution to that problem is even remotely feasible. People
use too many different ways to denote versions, so you can't expect PyPI to
sort them "correctly".

If you think this is an important issue, please provide a thorough
specification, as a PEP, circulate it, and get people agree. If you then
have still time left, please consider contributing a patch to PyPI.


Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2008-03-20 15:36 richard
resolution_id None 2008-03-20 15:36 richard
close_date - 2008-03-20 15:36 richard