Resolver spends too much time calculating "weights" to parents
See original GitHub issueDescription
When running something like pip install -c requirements.txt <package_name>
sometimes pip starts checking unnecessary versions.
I know that version checking is unnecessary because requirements.txt
contains all the packages with exact versions.
Everything works as expected with legacy resolver.
Expected behaviour
Since all of the versions are already specified, just get them.
pip version
21.2.4
Python version
3.8.8
OS
Ubuntu
How to Reproduce
Unfortunately, I can’t provide a reproducible example since it only happens with a package on internal pip index.
The offending package does have the version specified in requirements.txt and a different version is installed when the command is run.
Output
It says something like:
INFO: pip is looking at multiple versions of kiwisolver to determine which version is compatible with other requirements. This could take a while.
But I already have kiwisolver==1.3.1
in my requirements.txt
.
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Issue Analytics
- State:
- Created 2 years ago
- Comments:34 (22 by maintainers)
Top Results From Across the Web
Special Cases | 2021-2022 Federal Student Aid Handbook
Entire text of the HEA section on PJ Special circumstances may include: tuition expenses at an elementary or secondary school; medical, dental, ...
Read more >HOW IS CHILD SUPPORT CALCULATED - California Courts
The guideline calculation takes into account the following: How much money the parents earn or can earn,; How much other income each parent...
Read more >A guide to parenting arrangements after separation or divorce
If a child spends more than 60% of the time with one parent, the other parent will generally pay child support. A parenting...
Read more >Body Mass Loss Calculator
This calculator aids in determining how much fluid is needed for each individual athlete during exercise (in regards to how much weight they...
Read more >Child Visitation | Visitation (Parenting Time) Guidelines - Nolo
If you can't agree on when you and the child should spend time together, ... with the child's parent may help your relationship...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s not the dependency resolution that is slow here – I’ve demonstrated that above. As @uranusjr noted, the problem in this case is the logic that’s computing the “order to install packages” (
get_installation_order
->get_topological_weights
). That logic is being ridiculously slow, likely due to the very edge-heavy/dense dependency graph that this situation has; and possibly due to a state management bug in that logic.From the report, resolution time isn’t the actual issue though, it’s after the resolution where we sort packages for installation.