Returning a RequirementSet from Resolver.resolve
See original GitHub issueDescription
Currently, pip’s Resolver.resolve
method is expected to mutate the RequirementSet provided to it; which results in a slightly difficult to follow control flow.
Desired behavior
Resolver.resolve(req_set: RequirementSet) -> RequirementSet
Known Challenges
pip’s install
, download
and wheel
commands, have a requirement_set.cleanup_files()
call in a try-finally, which means that the existing requirement set is clearly assumed to be the only one that exists. We’d likely want to construct a new set in the new resolver, so figuring out how we’d handle cleanups is the main thing to do here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Angular2: Return an object in a resolver - Stack Overflow
The Observable.of(false) seems to work, I go to the homepage, but with Observable.of(result) , I don't get the result in my component ......
Read more >Python Resolver.resolve Examples ...
Python Resolver.resolve - 4 examples found. These are the top rated real world Python examples of pipenvpatchednotpip_internalresolve.
Read more >src/pip/_internal/resolution/legacy/resolver.py - Fossies
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting...
Read more >https://www.pi-dev.co.id/kesehatansistem/be/env/li...
_internal.req.req_set import RequirementSet from pip._internal.resolution.base import BaseResolver from pip._internal.resolution.resolvelib.provider import ...
Read more >src « felix « org.eclipse.osgi « bundles - rt.equinox.framework.git
path: root/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java ... newFixedThreadPool(m_parallelism); try { return resolve(rc, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve unassigned myself from this because I’m struggling to understand what it actually means. I get the broader goal of improving the control flow, and decoupling “before the resolve” from “after the resolve”, but I’m not clear how this specific change would work in that context. So rather than block someone else from looking at it, I’ve unassigned myself.
It wouldn’t need to, you’re right. As long as we enrich the resolver result with information indicating that some of the things already installed will need to be force-reinstalled then I think that’s good enough. The resolver doesn’t need to know about a “force install” option. Above I was imagining it from the perspective of a function that would take a “resolver result” (and an install scheme) and do the required installations with no other input.
In my view the resolver will return Projects (or some wrapper around them), or objects that we use as an index into a lookup table of the Projects that have been used during the resolution process.
The rest of your statements sound reasonable to me.