2009/6/14 Ben Finney
Paul Moore
writes: One other aspect of standard practice that I just realised your rules don't cover is where version strings differ in length. The normal lexicographic "shortest is earliest" rule doesn't work properly:
1.2a1 vs 1.2 (I hope everyone agrees that 1.2a1 is earlier)
No, I don't agree. Those each represent two components, where the first is identical and the second is different; and when comparing the two different components, I would expect “2” to be earlier than “2a1”.
I don't think it's possible to get away with 1.2a1 sorting after 1.2. At the bare minimum, the Python core version numbering needs to be supported IMHO. (Not because it's going to be used frequently in this context, but because it's the base model that all Python extension authors will be familiar with, and so most likely to be what they base any further extensions on). Paul.