-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- 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 (
-vvvoption).
- OS version and name: Ubuntu 20.04.3 LTS
- Poetry version: 1.2.0a2
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/provinzkraut/c7b3cad8dde639effaf3b8d9fade09da
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
- Manually add the new version in
pyproject.tomland runpoetry update - Run
poetry remove <package_name> && poetry add <package_name>(which is not ideal because of Poetry uninstalls all dependencies when removing any dependency viapoetry remove#4632)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected