-
Couldn't load subscription status.
- Fork 3.2k
Description
The resolver appears to treat projectname @ git+https://[email protected]/org/repo.git as different from projectname @ git+https://github.com/org/repo.git even though they're the same thing and the only difference is the "git@" in the url. If something is required directly and indirectly (via another requirement) using slightly different but totally valid URL variations, pip fails with a version conflict error.
pip install -r requirements.txt on a requirements.txt containing:
project-abc @ git+https://github.com/org/project-abc.git
project-def @ git+https://github.com/org/project-def.git
Where project-def has a requirements.txt containing the "git@" URL variant:
project-abc @ git+https://[email protected]/org/project-abc.git
Produces
ERROR: Cannot install -r requirements.txt (line 2) ... because these package
versions have conflicting dependencies.
The conflict is caused by:
The user requested project-abc 0.1.0 (from git+https://github.com/org/project-abc.git)
project-def 0.1.2 depends on project-abc 0.1.0 (from git+https://****@github.com/org/project-abc.git)
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
Removing the "user@" from the second requirements.txt avoids this, but it worked before the resolver upgrade and may require changes to packages upstream from the user.
Expected Behavior
Working URL variations for the same package should not affect version resolution.
Environment details
pip 20.3.1
macOS Mojave 10.14.6
Python 3.8.6