pdm: slow pdm lock example
- I have searched the issue tracker and believe that this is not a duplicate.
Make sure you run commands with -v flag before pasting the output.
Steps to reproduce
$ mkdir stackstac
$ cd stackstac
$ git clone git@github.com:gjoseph92/stackstac.git .
$ git rev-parse HEAD
e30ecf233ee42c1c98fcfbc5178ff105ba60760e
$ pdm --version
PDM, version 2.8.2
$ time pdm --lock
Actual behavior
I actually don’t know how long this takes - it has been about forty minutes so far. But it’s a long time.
Expected behavior
Faster locking.
Environment Information
# Paste the output of `pdm info && pdm info --env` below:
PDM version:
2.8.2
Python Interpreter:
/home/dch/stackstac/.venv/bin/python (3.10)
Project Root:
/home/dch/stackstac
Local Packages:
{
"implementation_name": "cpython",
"implementation_version": "3.10.12",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_release": "5.15.90.1-microsoft-standard-WSL2",
"platform_system": "Linux",
"platform_version": "#1 SMP Fri Jan 27 02:56:13 UTC 2023",
"python_full_version": "3.10.12",
"platform_python_implementation": "CPython",
"python_version": "3.10",
"sys_platform": "linux"
}
I actually found this one by looking for examples of poetry being slow, in the hope of finding something interesting that could be improved there. stackstac switched from poetry to pdm “because Poetry was taking multiple hours to lock dependencies”.
However today it seems to be pdm that is taking a considerable time to lock dependencies, so I thought you might appreciate the example.
About this issue
- Original URL
- State: open
- Created 10 months ago
- Comments: 26 (13 by maintainers)
Well, the resolution failure can be also observed on pip using the following requirements.txt:
It seems the
pystacrequirement somehow crashes the tree and prevent it from backtracking further. Because in the whole process till it reaches to a failure,pandas 1.*were never tried.So it is a certain issue with
resolvelib, and the fix should also happen there.yes, that’s where we got to. The thread got a bit long but the course it has taken is
I guess it’s plausible that if you fix the bug associated with the second set of requirements, then the failure-to-reach-any-decision of the original report may also go away.
Thanks for insisting 🙂 And thanks for the initial report.
If I remove
pystacfrom the dependencies, it solves after a few minutes, ending with this:So same as Poetry. Not sure why adding
pystacto the deps gives the above error message.https://gist.github.com/dimbleby/f4599ffb2429400fc1c9963b632ccc82
A compatible solution does exist, but pdm is failing to find it in reasonable time. (I still don’t know how long it takes, the command is still running).
If you’re OK with “eventually” then fair enough. But I’d think that fast is better than slow.