Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix version sort in PackageFinder #604

Closed
wants to merge 1 commit into from
Closed

Conversation

qwcode
Copy link
Contributor

@qwcode qwcode commented Jul 16, 2012

When working on for tests for #598 (and possibly #571), I noticed when using -U and --find-links together, it would always re-install pkgs and never return "Requirement already up-to-date"

What I found to be the issue was the version sorting in PackageFinder.find_requirement. The sorting was only coincidentally accurate most of the time due to the order the various lists were put together.

There seemed to be an intention in the code to somehow be using the "Inf" object for sorting, but it wasn't actually using it, as best I could tell. In this change, I tried to change as little possible to fulfill the intention of using the Inf object. I did pull the sorting out into a specific method to make it easy to unit test.

Also, I discovered a condition, that would never evaluate to true. I added a FIXME comment.

I am aware that tests are failing with this.

This change seems to be exposing other cases where things were ok only by coincidence. I'll look at that tomorrow.

Posting this in incomplete form to possibly get feedback to make sure I'm not off the track with this change.

@travisbot
Copy link

This pull request fails (merged 7262716 into c6789f6).

@qwcode
Copy link
Contributor Author

qwcode commented Jul 16, 2012

going to break this up into 3 pulls with relevant tests for clarity.
there's 3 independent bugs in here.

@qwcode qwcode closed this Jul 16, 2012
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants