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

pdm loops indefinitely, instead of deciding quickly, that requires-python is set too low #776

Closed
1 task done
meop opened this issue Dec 5, 2021 · 0 comments · Fixed by #778
Closed
1 task done
Labels
🐛 bug Something isn't working 🧩 dependency resolution Resolution failures

Comments

@meop
Copy link

meop commented Dec 5, 2021

  • I have searched the issue tracker and believe that this is not a duplicate.

It is similar to these two bugs, although not identical, because they have already been fixed, and I have a version of pdm with those fixes merged.

#627
#744

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

Case 1:

In an empty project, set:

requires-python = ">=3.7"

Then:

pdm install
pdm add pandas==1.3.4 -v

You can see that the output loops for a little while, mostly on numpy constraints, but pdm ultimately accurately decides that pandas requires Python 3.7.1, not 3.7, and prints this. This is good.

Case 2:

However, if instead of an empty project, you had:

dependencies = [
    "matplotlib==3.4.3",
]
requires-python = ">=3.7"

Then again you do:

pdm install
pdm add pandas==1.3.4 -v

This appears to be too much for pdm. It loops for a few minutes printing again mostly numpy constraints, until I cancel it.

Projects are often much bigger than 1 package, and if only 2 packages are able to confuse the dependency resolver, that is not good.

The workaround is of course, you can find out through external means that certain packages have minimum Python version requirements, and adjust your config accordingly.

Actual behavior

Pdm completes but is a bit slow for Case 1.
Pdm loops indefinitely for Case 2.

Expected behavior

Pdm completes fast for Case 1.
Pdm completes fast for Case 2.

Environment Information

It is actually version 1.11.0 through homebrew, and there is an open bug about 0.0.0 printing.

PDM version:        0.0.0
Python Interpreter: /Users/me/.asdf/installs/python/3.10.0/bin/python (3.10)
Project Root:       /Users/me/source/code/my/project
Project Packages:   /Users/me/source/code/my/project/__pypackages__/3.10
{
  "implementation_name": "cpython",
  "implementation_version": "3.10.0",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "21.1.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64",
  "python_full_version": "3.10.0",
  "platform_python_implementation": "CPython",
  "python_version": "3.10",
  "sys_platform": "darwin"
}

Thanks for working on this tool!

@meop meop added the 🐛 bug Something isn't working label Dec 5, 2021
@frostming frostming added the 🧩 dependency resolution Resolution failures label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🧩 dependency resolution Resolution failures
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants