-
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
extras not handled correctly when a distribution occurs twice in the dependency graph #3189
Comments
Specific scenario in openstack, we have oslo.db has an extras named 'fixture' which has a couple of libraries used only in tests. we'd like to add oslo.db[fixtures] to either test-requirements or tox.ini when oslo.db is already present in requirements.txt . Currently pip fails with: |
What is called general case here matches what I rised in issue #3147 and according to @xavfernandez pull #2716 by @rbtcollins :) is supposed to fix this. |
#3105 is at least partially fixing this. My resolver branch can fix 'correctly' this, but we don't need to wait for it to address the basic defect (since we can union all extras together easily enough). |
Any duplicate distributions will currently raise an error, even if their extras are different: for example, 'pip install bar bar[foo]'. Detect this situation, and union the extras together. Closes pypa#3189
If a dependency is mentioned in constraints we just take that version, meaning we will completely ignore any extras requested on the command line or in a requirments file. This takes a union of the two before installing. Co-Authored-By: Sachi King <[email protected]> Closes pypa#3046, pypa#3189
Compare extras when checking if a requirement has already been specified, and take a union of the extras before installation. Co-Authored-By: Sachi King <[email protected]> Closes pypa#3046, pypa#3189
Compare extras when checking if a requirement has already been specified, and take a union of the extras before installation. Co-Authored-By: Sachi King <[email protected]> Closes pypa#3046, pypa#3189
For both the special case of on-the-command-line:
which will error with 'duplicate requirement'
and the general case of two references in the dependency graph:
where foo depends on bar and quux, and quux depends on bar[extra]
which will fail to install whatever is listed in bar[extra].
For all these cases we should:
The text was updated successfully, but these errors were encountered: