-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
pip-compile fails with current master branch of pip #853
Comments
It would help for me to know which parts of PackageFinder pip-tools needs / uses while refactoring of PackageFinder continues. |
I'll also add that I'm hoping that at some point, we'd be able to pull out the logic for PackageFinder out of pip, into a new package. That's obviously after the ongoing refactoring, and it'll help to know how PackageFinder is used here since I expect pip-tools to be a consumer of that library eventually. |
Hi @cjerdonek, thanks for helping!
First of all, pip-tools uses PackageFinder to parse pip options (index_urls, find_links, allow_all_prereleases, trusted_hosts and format_control) from Secondly, pip-tools's package resolver uses PackageFinder's logic:
Hope it helps. |
Hello @pganssle, thanks for raising this issue!
CI has been failing since 19.1, as soon as refactoring of PackageFinder has been started. Unfortunately we can't fix it now before 19.2, because it may be broken any time after the fix on
I agree with you to a certain extent, it's a good idea. But as i said before we can't fix issues caused by pip master before a release, so CI notifications won't much help, but make noise. And still we can track that something is happening in master when ci-jobs starts to fail (even silently) and be prepared to make quick fix in Actually, i have no idea how to prevent breaking |
For users finding this issue, a workaround is to downgrade pip: |
Couldn't you still update pip-tools so that CI against pip master passes, as changes to pip occur before any pip release? That would prevent pip-tools from falling too far behind and make it so that a pip-tools release would be ready to go (provided there weren't any last minute changes to pip that break pip-tools before a pip release). |
Spending couple days to fix pip>=19.2 compatibility and refactoring the |
I'd say you don't have to be in sync with every commit but it'd definitely help. TBH, I even think that if y'all and Chris are okay with it, we could discuss design details on the pip PRs, if need be. |
wouldn't setting |
Here is my currint solution (I use this in my makefiles) pip install 'pip<19.2' This way I have i only for the duration of the compile. It woudl however be better to have a current release that works with the newest version of pip |
Hey, guys! |
@laura-surcel: @vphilippon and I are the only ones allowed to make a release. I can see what is possible, but I have been very far from the python world in the last years. I will try to release tonight. |
@vphilippon beat me to it thanks ! |
It’s already set actually, but nobody pays attention on it. But we should |
I confirmed that the fix works on macOS python 3.7.4 with pip 19.2.1 |
I'm concerned about that for each major pip release we will have to add new code branches (to provide compatibility) and new CI dimension for the pip release (to prevent decrease test coverage). The pip doesn't have public API and What about pip vendoring? The pip had been vendored before (because of huge refactoring on pip==10.0, see #580) and later it was removed (see #657). But now we face the same issues. Pros:
Cons:
|
Is it really necessary to keep supporting pip N versions back? What about supporting only the most recent versions? Then old supporting code can be deleted when new code is added. |
Using pip-shims should reduce some of the pain of maintaining support. |
I can't say for sure how much is it necessary, but pip-tools works since 8.* and we still get reports from users with ancient pip versions (e.g., the last one is #865, which has pip==9.0.1 on Ubuntu 18.04). Supporting the most recent versions sounds reasonable to me. The question is how many? However it should be discussed with band members.
Thank you for the reference! Yes, i've seen that package recently though. Could be useful and might replace pip_compat.py. But i'm concerned more about increasing branches like this ones. |
That's just the nature of the beast. :( My best suggestion to reduce the problem here is to trim the space, like @cjerdonek suggested -- only supporting a few "recent" versions of pip (something like last 2 minor version releases), instead of everything till like, pip 9 and all. |
In thinking about this, it seems like the main important thing is that for each pip release, there is at least one version of pip-tools that users can use. Then, if someone wants to use a newer version of pip-tools, they would just possibly need to use a newer version of pip. (If someone can't be bothered to upgrade pip, then how important is it that they be able to upgrade pip-tools?) With this strategy, a given pip-tools version would only need to support one minor version at a time (e.g. only pip 19.3.x). And the pip-tools release cadence would basically be the same as pip's (maybe needing to release whenever pip comes out with a new minor version, which it would have to do anyways), but releases could be done more often, too. |
That's a great question! |
I've added a cron job in Travis CI. I believe, there should be a way to exclude PIP=master from "allow_failures" to |
Hey folks! I've added a cron job to test pip-tools against pip master in #916. I would appreciate any feedback and reviews. Thanks! |
If you install any version of pip after cad71a711787ed66 and try to run
pip-compile
on any file, you will get an error in the constructor forPackageFinder
. In the linked commit, it complains about unexpected keyword argumenttrusted_hosts
and in later commits it complains about various other keyword arguments. The current master (4cf08e85c09ad213) complains aboutfind_links
(see full traceback below), failing on this line.The latest behavior (failing with
find_links
) starts with in 7d08bb37a55ff7cf.I will note that considering the fact that
pip-tools
is apparently making use ofpip
's internal (private) API, it would be a good idea to add a CI job to build against the master branch ofpip
, so you can more easily catch these issues before release.Steps to reproduce:
mkdir -p /tmp/pip_compile_repro cd /tmp/pip_compile_repro
requirements.in
file and attempt to compile itActual result
Gives a traceback:
TL;DR:
Expected Result
CC @cjerdonek in case he wants to help out.
The text was updated successfully, but these errors were encountered: