-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Drop INSTALLED_VERSION #3211
Drop INSTALLED_VERSION #3211
Conversation
07b790b
to
cebbd14
Compare
I'm not quite sure what this is doing... The stopping of sorting by location is dubious - I thnk #928 should be closed won'tfix - a fundamental assumptio n is that two distributions of X with version Y are equivalent. |
@xavfernandez I can look at this more tomorrow, but to be clear, I wasn't imagining this much refactor when I wrote #703 3 years ago. At the time, I think I was just thinking that Also, I don't think you should throw a #928 change into this. that's a behavior change that should be considered separately in another PR IMO. |
Well I don't see a good reason to prefer Edited: but you're right #928 is dubious and was closed. The last commit does not reference it anymore. |
b01a7c7
to
e27616f
Compare
@qwcode the refactor aims at extracting the logic of what to do with the installed version ( The behavior before/after the refactor does not change:
It just does not rely anymore on the sort by location. |
From my point of view, ideally, the finder should only be provided with a requirement 'django>=1.5,<1.7' (a req_name and a version specifier) and only return a list of InstallationCandidate (or alternatively only the best/None). The logic of satisfied_by/upgrade should be performed in an other place. |
I agree with the idea that finder should only be provided with a requirement and return a list of candidates (or the best candidate). |
I'd say this PR is a refactoring cleanup to make this next change easier. |
|
I haven't read the code at all so my +1 is only to the idea of refactoring the finders to only find things and move the selection logic elsewhere.
Agreed, two invocations of pip should always return the same thing from a finder. |
not setuptools version
e27616f
to
4782ffe
Compare
@qwcode you're right :) I missed that, 1acff7ed10912a2 was removed from the PR.
Good point, I updated it. Good thing I waited before merging 😀 |
ok, cool, it's just a refactor now. looks ok to me. |
Drop INSTALLED_VERSION and light refactor of Finder.find_requirement
Thanks :) |
closes #703
This refactor is a first step to ease the transition to a simpler
Finder
, only returning a list ofInstallationCandidate
(or alternatively only the best/None) from a req_name and a version specifier (i.e. something likedjango>=1.5,<1.7
).The logic of satisfied_by/upgrade could/should be performed in an other place.