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

[SolverProblemError] Wrong dependency solving #3901

Closed
3 tasks done
Olegt0rr opened this issue Apr 9, 2021 · 5 comments
Closed
3 tasks done

[SolverProblemError] Wrong dependency solving #3901

Olegt0rr opened this issue Apr 9, 2021 · 5 comments
Labels
status/duplicate Duplicate issues

Comments

@Olegt0rr
Copy link

Olegt0rr commented Apr 9, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Actions

  1. Create empty project
  2. Add dependency pymongo = {version = "3.11.3", extras = ["srv"]}
  3. Run poetry add dnspython

Expected output:

# pyproject.toml

[tool.poetry.dependencies]
python = "^3.8"
pymongo = {version = "3.11.3", extras = ["srv"]}
dnspython = "~1.16"

Real output

poetry add dnspython     
Using version ^2.1.0 for dnspython

Updating dependencies
Resolving dependencies... (0.0s)

[SolverProblemError]
Because tree depends on pymongo (3.11.3) which depends on dnspython (>=1.16.0,<1.17.0), dnspython is required.
So, because tree depends on dnspython (^2.1.0), version solving failed.

Rich log: https://gist.github.com/Olegt0rr/a464bc0f8fc6db6c87d9ba547273f8cb#file-console-log

@Olegt0rr Olegt0rr added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Apr 9, 2021
@finswimmer
Copy link
Member

Hello @Olegt0rr,

it seems that the resolver tries to find a solution for the latest major version of the dependency only and gives up if it cannot find a solution. Giving poetry a hint where to start searching works as a workaround, e.g. poetry add "dnspython=~1.16".

fin swimmer

@Olegt0rr
Copy link
Author

Olegt0rr commented Aug 2, 2021

@finswimmer,
Thanks for manual workaround, but it so weird for me to make hints about version resolving :)
Still waiting for fixing this behaviour

@dimbleby
Copy link
Contributor

another duplicate of #707

@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 23, 2022
@neersighted
Copy link
Member

Good catch.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

4 participants