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

The resolver doesn't take into account of the requirements from both bare package and package[extra] #1851

Closed
1 task done
cspotcode opened this issue Apr 25, 2023 · 0 comments · Fixed by #1852
Closed
1 task done
Labels
🐛 bug Something isn't working 🧩 dependency resolution Resolution failures

Comments

@cspotcode
Copy link

  • 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

This reproduction has dependency declarations that are incompatible due to their transitive dependencies.

https://github.com/cspotcode/repros/tree/pdm

Actual behavior

pdm install appears to hang while installing dependencies with conflicting requirements. Using -v reveals it is looping forever.

Expected behavior

pdm install shows an error describing the conflicting requirements and exits with a non-zero exit code, indicating a problem with my dependency declarations.

Description

In my reproduction, pytest-cov and coveralls have conflicting requirements for transitive dependency "coverage." This means pdm should exit with an error. (I do not expect pdm to magically resolve conflicting dependencies) However, for some reason it loops forever, only describing the problem when run with -v.

The linked README has a more complete log, but this snippet in particular is relevant, seen when running pdm install -v

pdm.termui: ======== Starting round 4 ========
pdm.termui:   Adding requirement tomli; python_full_version <= "3.11.0a6"(from coverage 7.2.3)
pdm.termui:   Adding requirement coverage==7.2.3(from coverage 7.2.3)
pdm.termui: Candidate rejected: [email protected] because it introduces a new requirement coverage==7.2.3 that conflicts with other requirements:
    coverage!=6.0.*,!=6.1,!=6.1.1,<7.0,>=4.1 (from [email protected])
pdm.termui:   Adding requirement tomli; python_full_version <= "3.11.0a6"(from coverage 7.2.3)
pdm.termui:   Adding requirement coverage==7.2.3(from coverage 7.2.3)
pdm.termui: Candidate rejected: [email protected] because it introduces a new requirement coverage==7.2.3 that conflicts with other requirements:
    coverage!=6.0.*,!=6.1,!=6.1.1,<7.0,>=4.1 (from [email protected])
pdm.termui:   Adding requirement tomli; python_full_version <= "3.11.0a6"(from coverage 7.2.3)
pdm.termui:   Adding requirement coverage==7.2.3(from coverage 7.2.3)
pdm.termui: Candidate rejected: [email protected] because it introduces a new requirement coverage==7.2.3 that conflicts with other requirements:
    coverage!=6.0.*,!=6.1,!=6.1.1,<7.0,>=4.1 (from [email protected])
pdm.termui:   Adding requirement tomli; python_full_version <= "3.11.0a6"(from coverage 7.2.3)
pdm.termui:   Adding requirement coverage==7.2.3(from coverage 7.2.3)

... loops indefinitely ...

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
$ python -m pdm info
PDM version:
  2.5.3
Python Interpreter:
  /home/cspotcode/dev/@cspotcode/repros/.venv/bin/python (3.8)
Project Root:
  /home/cspotcode/dev/@cspotcode/repros
Local Packages:
  
$ python -m pdm info --env
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.10",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.10.102.1-microsoft-standard-WSL2",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Wed Mar 2 00:30:59 UTC 2022",
  "python_full_version": "3.8.10",
  "platform_python_implementation": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}
@cspotcode cspotcode added the 🐛 bug Something isn't working label Apr 25, 2023
@frostming frostming changed the title pdm install appears to hang, actually stuck in endless loop, when resolving conflicting transitive dependencies The resolver doesn't take into account of the requirements from both bare package and package[extra] Apr 25, 2023
@frostming frostming added the 🧩 dependency resolution Resolution failures label Apr 25, 2023
frostming added a commit that referenced this issue Apr 25, 2023
…s from both bare package and package[extra]

Signed-off-by: Frost Ming <[email protected]>
frostming added a commit that referenced this issue Apr 25, 2023
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
2 participants