-
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
Link comparison fails to normalise file://localhost/ #10162
Comments
Any update here? |
Sorry for the delayed response. pip is an entirely volunteer-run project and it is often we don't have enough issue triaging capacity to respond to reports. It seems like the issue is with the $ git diff
-------------------------------------------------------------------------------
modified: lib/b/setup.py
-------------------------------------------------------------------------------
@ lib/b/setup.py:9 @ setup(
author='nmonterroso',
packages=find_packages(include=['lib_b*']),
install_requires=[
- f'lib_a@file://localhost/pip_resolver/lib/a'
+ f'lib_a@file:///pip_resolver/lib/a'
]
)
$ docker build . -f app/x/Dockerfile
[+] Building 5.3s (12/12) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/python:3.9.6 0.0s
=> [1/7] FROM docker.io/library/python:3.9.6 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 813B 0.0s
=> CACHED [2/7] RUN mkdir -p /pip_resolver/lib 0.0s
=> [3/7] COPY lib /pip_resolver/lib 0.1s
=> [4/7] RUN mkdir -p /pip_resolver/app 0.6s
=> [5/7] COPY app/x/ /pip_resolver/app/x/ 0.2s
=> [6/7] WORKDIR /pip_resolver/app/x 0.2s
=> [7/7] RUN pip install -r requirements.txt 3.3s
=> exporting to image 0.6s
=> => exporting layers 0.4s
=> => writing image sha256:67f579173acb6be423c4708851286437e111d4e70fb5b30ec35c223e223f4a92 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
$ docker images | head -n2
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 67f579173acb Just now 893MB Since |
Thanks for this! It's working as expected 😄 |
Description
It seems like there's an issue with the new dependency resolution with local packages. I have a repo demonstrating the problem: https://github.com/nmonterroso/pip-21.1.3-resolution.
I have a repo with the following structure:
This mirrors a monorepo I'm working on, where
lib_b
depends onlib_a
, and appx
depends on bothlib_b
andlib_a
. When runningpip install -r requirements.txt
for the app, I get a version conflicts forlib_a
from the app andlib_b
. These go away if I use the legacy resolver (via--use-deprecated=legacy-resolver
).Expected behavior
I would expect that since the files are the same files on local disk that the dependency resolution recognizes that they don't conflict and the single package
lib_a
can be installed.pip version
21.1.3
Python version
3.9.6
OS
macos/Docker
How to Reproduce
docker build . -f app/x/Dockerfile
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: