Add support for pip's 2020 dependency resolver#1539
Add support for pip's 2020 dependency resolver#1539atugushev merged 6 commits intojazzband:masterfrom
Conversation
|
I confirm that this fixes my original use case in #1277 🚀 Details |
|
Hello @atugushev Thank you for pinging me to test your branch, and thank you for taking the time to work on this feature! I tried it and I noted some remarks:
I don't know if we want to output the same package name twice?
For example: Will output: While: Will output: |
|
@FlorentJeannot thanks for the feedback and good catch! Looks like we need more tests for packages with extras. I'll address the bugs shortly. |
|
Thank you @atugushev. I found another one, not sure if it's related to your changes though. When I declare a local file which contains an egg (for example Let me know if you need an exemple and thank you. |
|
@FlorentJeannot if you could send a PR with a failing test, it'd be easier to come up with a fix separately, once it's committed in Git. Per https://pganssle-talks.github.io/xfail-lightning/. |
@FlorentJeannot I don't know if @atugushev wants to merge this before or after #1329 |
| PIP_EXISTS_ACTION="i" | ||
| ): | ||
| # Mark direct/primary/user_supplied packages | ||
| for ireq in self.constraints: |
There was a problem hiding this comment.
I don't understand why not apply this conversion to the constraints list during the initialization. Also, I don't really understand why this needs to be mutable. Is that expectation that it'll be modified by external callers post-initialization?
There was a problem hiding this comment.
I don't understand why not apply this conversion to the constraints list during the initialization.
Do you mean inside Resolver.__init__()?
|
I wonder if the varying extras behavior noted by @FlorentJeannot is resolved by @richafrank's sitting PRs. @atugushev Do you think we'll be finalizing this one before any other PRs, or are there some you plan to review and merge first? |
Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
It shouldn't raise an error when a preexisting output file's pins conflict with the input files' constraints. jazzband#1539 (comment)
Co-authored-by: Richard Frank <rich@quantopian.com>
|
I'm so happy this finally merged. Many thanks to my heroes @AndydeCleyre, @FlorentJeannot, @richafrank, @ssbarnea, @thomas-riccardi, @webknjaz, and all others involved for your support. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
One thing I noticed is that this is significantly slower than the legacy resolver, presumably because it's not using the pip-compile cache. What's worse is that for things that don't have pypi-built wheels for the target host, it has to rebuild the wheels every time, which is especially painful when doing things involving cython. |
|
@deifactor It is not a bug, just an opportunity for you to make a pull-request and address this performance regression! ;) |
|
Worth opening an issue for wider visibility? |
It shouldn't raise an error when a preexisting output file's pins conflict with the input files' constraints. jazzband/pip-tools#1539 (comment)
|
Hi @atugushev I have a question! I need both |
|
@taeefnajib Python doesn't allow you to install two different versions of the same dependency in the same environment, so we can't support two versions of a package in a requirements.txt file. You'll need to find a set of dependencies that all work with the same version of |
|
@ryanhiebert thanks. let me see why |
|
@ryanhiebert Just a quick question! When I put |
|
@taeefnajib it's probably installing one version, then uninstalling that to install a different version. Run |
|
@AndydeCleyre you are right. I can only see |
|
It looks like pip will install flytekit 1.2.11 (latest release is 1.5.0), which requires |
|
@luhn thanks. Yes, it's installing |
What's new?
Added new option
--resolver [backtracking|legacy]topip-compile(default islegacy).How to use?
To enable 2020 dependency resolver run
pip-compile --resolver=backtracking.Backtracking resolver example
Legacy resolver example
Contributor checklist
Maintainer checklist
backwards incompatible,feature,enhancement,deprecation,bug,dependency,docsorskip-changelogas they determine changelog listing.