-
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
Same dep but with extra treated as independent #9437
Comments
The reason to this is actually the same as #8785. The resolver does “know” about This is difficult because the way resolution works is sort of like breaking the problem apart and try to solve each piece separately (how efficient the solution is mostly depends on how good you can break the thing apart). Extras are basically a backdoor to that, they produce things that can affect multiple pieces and make it difficult to reasonably break the problem into bite-chunk pieces in a pre-determined way. |
I figured it was something like that. Thanks for taking the time to look this over. Not sure if you looked through my Anyways, the workaround isn't super hard and I know one thing to look for if I hit the backtracking again. Thanks. |
Combining this into #8785. |
Shouldn't be needed in pip >= 21.1. pypa/pip#9437 pypa/pip#8785 pypa/pip#9775
While #8785 has been closed by #9775, the issue reported here continues with pip 21.1.3. That said, it does appear to be fixed on FROM python:3.9.1-buster AS base
RUN apt-get update; apt-get install --yes coreutils
RUN git clone https://github.com/altendky/ssst
WORKDIR ssst
RUN pip install pip==21.1.3 setuptools==57.1.0 wheel==0.36.2
RUN pip freeze --all
FROM base AS succeed
RUN git checkout 1e23bf26a47b48d714ae643f5d8af95394172464
RUN timeout 120 pip install .[pyside2]; true
FROM base AS fail
RUN git checkout 9063449c61ca4e6942508b2fc343ba7585539f99
RUN timeout 120 pip install .[pyside2]; true
FROM base AS master
RUN python -m pip install -U "pip @ https://github.com/pypa/pip/archive/f37fc4c3e80acea52444ec34db3bdfffab9d9618.zip"
RUN git checkout 9063449c61ca4e6942508b2fc343ba7585539f99
RUN timeout 120 pip install .[pyside2]; true $ docker build --no-cache -t foo - < Dockerfile.txt FROM python:3.9.1-buster AS base
FROM base AS succeed
FROM base AS fail
FROM base AS master
|
What did you want to do?
Here is a snipped snippet of my
setup.cfg
to setup the scenario. Full code is certainly also available.When attemping to install with the
pyside2
extra, this results in pip catastrophically backtracking including downloading several copies of QTrio which are less than 0.4.1.Changing the extra's QTrio dependency to
qtrio[pyside2] ~=0.4.1
avoids the backtracking. While I can certainly understand how this could happen, it doesn't seem proper. 0.3.0 clearly won't satisfy~=0.4.1
so it shouldn't need to be looked at at all. I think...?Not-working commit (newer): altendky/ssst@5b4a915
Working commit (older): altendky/ssst@dca6027
Here's a
Dockerfile
that shows the succeeding case, failing case, and failing withpip@master
. I ran it asdocker build --no-cache -t foo - < Dockerfile.txt
.Dockerfile.txt
FROM python:3.9.1-buster AS base
FROM base AS succeed
FROM base AS fail
FROM base AS master
Additional information
pipdeptree etc
The text was updated successfully, but these errors were encountered: