Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
fix PackageFinder version sorting #683
PackageFinder version sorting has only coincidentally been working due to the ordering of the various version lists prior to the sorting.
In the case where there were
The sort logic seemed to be originally intending to use the "Inf" object (in a multi-key sort) to cause existing installations to sort first when the version was the same, but wasn't actually using "Inf", and was only sorting by version alone.
You can recreate the problem by using these new tests (with the added simple-.0.tar.gz dists) against the old code.
In these changes, I tried to implement what I think was originally intended, w/o doing too much refactor (better to isolate refactor in dedicated pulls). The result is that the coincidental success should now be real success for any type of version tuple.
This change also corrected a bug where a certain block of code was never running before due to an incorrect index reference. In that block, is the possibility of raising