-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Refactoring needed to bring in resolvelib's Resolver abstraction #7317
Comments
AFAICT, the main way that dependency resolution is entangled with metadata generation today is (1). To decouple them, my plan is:
This would eliminate the cyclic dependency between I don't think we'd be able to directly use this new For self-reference later, this is what the prepare method looks like: def prepare(self, candidate):
if candidate.editable:
return self.prepare_editable_requirement(candidate)
if candidate.link:
return self.prepare_linked_requirement(candidate)
if candidate.already_installed:
return self.prepare_installed_requirement(candidate)
assert False, "should never reach here"
|
For (2), the fix can be pretty targeted:
As an aside, we should change |
@chrahunt and I discussed this on voice call. We figured out that the best place to do this would be in |
As a note for posterity: as Paul mentioned in a meeting several weeks ago, we chose resolvelib as the least bad choice with the least blockers to overcome. Resolvelib API is the most straightforward. And we can plug something in later if we change our mind. |
I spent some time today, taking a look at where we are, w.r.t. bringing in resolvelib into pip, as part of #6536, for fixing #988.
I think there's only 2 main things remaining:
RequirementPreparer.prepare
to get anAbstractDistribution
fromInstallRequirement
unconditionally (/cc @chrahunt)applicable_candidates
, as part ofBestCandidateResult
(/cc @cjerdonek)I think I have a good idea for how to approach both of these changes. I'll elaborate on them in dedicated comments below.
The text was updated successfully, but these errors were encountered: