Skip to content
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

New resolver does not identify a subset of extras #8875

Closed
rrueth opened this issue Sep 13, 2020 · 2 comments
Closed

New resolver does not identify a subset of extras #8875

rrueth opened this issue Sep 13, 2020 · 2 comments
Labels
type: bug A confirmed bug or unintended behavior

Comments

@rrueth
Copy link

rrueth commented Sep 13, 2020

When installing a package with multiple extras (e.g. foo[a,b,c]), the new Pip resolver fails to identify an installed package with multiple extras (e.g. foo[a,b,c]) that is a superset of a requirement for the package with fewer extras (e.g. foo[a,b]) as valid.

What did you want to do?
I want to denote in a setup.py for my package, foo, that foo requires multiple extras for a specific dependency. For example:

setup(
    install_requires=[
        "lib[a,b]",
    ],
)

Then, in a requirements.txt file my application, bar, I need to install foo, and my application requires lib to be installed with more extras than just what foo needs. In my case lib is a local package that will be installed using -e. So my requirements file might look like this:

-e ../lib[a,b,c]
-e ../foo

Then, I ran pip using:

pip install \
        --use-feature=2020-resolver \
        --no-cache-dir \
        --no-index \
        --find-links="<path_to_a_local_wheel_directory>" \
        -r requirements.txt

Output
Pip failed to recognize that my applications lib[a,b,c] was a superset of foo's dependency on lib[a,b]:

ERROR: Could not find a version that satisfies the requirement lib[a,b] (from foo)
ERROR: No matching distribution found for lib[a,b]
@uranusjr
Copy link
Member

I believe this is the same as #8785. The subset thing is a bit misleading; the new resolver just have bugs handling local dependencies with extras in general.

@uranusjr uranusjr added C: new resolver type: bug A confirmed bug or unintended behavior labels Sep 18, 2020
@brainwane
Copy link
Contributor

Pradyun agrees with Tzu-ping. Thank you @rrueth for the bug report! Also, I thought you might want to know that we have also updated our migration guide and the details there may be helpful to you and your colleagues.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants