-
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
pip check does not check for missing extras requires #4086
Comments
I noted where that probably comes from: If we have a requirement like What could be done is probably to detect that the dependency is actually Note: this problem did not occur with other environment markers, as the values where provided by the environment (things like |
I think we should do something about this during the new resolver transition, since The idea I’m playing with in my mind is a file in the |
I'm a little burnt in the "get a file standardised into dist-info", but hey, I do like the sound of what you said, and I think we should do it! |
@uranusjr it might not be necessary to record additional information for the purpose of resolving this issue. Since the metadata of installed packages includes the dependencies (including the required extras), pip could take extras into account when transitively checking if all dependencies are satisfied. For instance I do something similar when showing the dependency tree in pip-deepfreeze. In this example (a project that depends on firebase-admin, but where grpcio is not installed) it detects the missing dependency, while |
This still doesn't cover users doing |
@pradyunsg yeah, that's for top level requirements. For that my proposal is still to extend |
Indeed recording user-supplied extras in |
@uranusjr For install, pip-deepfreeze uses pip. But it does build the dependency graph to decide what to uninstall and we have no perf issues with projects with hundreds of requirements. I'd guess the complexity for that is O(n log(n))? pip-deepfreeze does not need REQUESTED because it has one top level requirement (the PEP 517 project), but it would not be very different with several top level requirements found in REQUESTED. If the database of installed distribution (.dist-info) had de-normalized information, the complexity would move towards maintaining it with updates, and my impression is that it would be costlier for update operations, and harder to implement. |
I would guess the dominant parameter would be th depth of dependencies, not total number of packages. But hundreds of requirements should provide a realistic load, so I’m happy to go with your observation. What’s the next step? Should we open a discussion on Discourse to propose extending |
Description:
pip check does not check for missing extras requires.
What I've run:
Install
scikit-image
(skipping dependencies) anddask
.scikit-image
depends ondask[array]
butpip check
does not detect a mssing dependency.See also #3797.
The text was updated successfully, but these errors were encountered: