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

Unable to updateany package to latest version because wronlgy inferred dependency #4700

Closed
3 tasks done
provinzkraut opened this issue Nov 2, 2021 · 2 comments · Fixed by #4945
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@provinzkraut
Copy link

  • 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).

Issue

Trying to update any package with poetry add <package>@latest results in a SolverProblemError because poetry (wronlgy) assumes that the project depends on both the current and the version it's trying to install.

  SolverProblemError

  Because poetry-test depends on both cryptography (^3.4.7) and cryptography (^35.0.0), version solving failed.

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:146 in _solve
      142│             packages = result.packages
      143│         except OverrideNeeded as e:
      144│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      145│         except SolveFailure as e:
    → 146│             raise SolverProblemError(e)
      147│ 
      148│         # NOTE passing explicit empty array for seen to reset between invocations during update + install cycle
      149│         results = dict(
      150│             depth_first_search(

How to reproduce

  • Set up a new project with the provided pyproject.toml file
  • Run poetry install
  • Run poetry add cryptography@latest

Workaround

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

Thanks a lot for reporting 👍

I'm able to reproduce it. It works with poetry 1.1.12.

Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants