When having a git dependency, Poetry fails with SolverProblemError while trying to run $ poetry install twice
See original GitHub issue-
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). -
OS version and name: Debian Booster; Windows 10
-
Poetry version: 1.0.0b1 as installed by pip for python 3.8.0b4; 0.12.17
-
Link of a Gist with the contents of your pyproject.toml file: link
Issue
Run
$ poetry new a
$ cd a
$ vim pyproject.toml
Add a single dependency like this:
attrs = { git = "https://github.com/python-attrs/attrs.git", rev = "daf2bc8182a681ed0c85271bafbd24c2ca5ea70b" }
Run $ poetry install
. Observe that correct version of attrs is installed
- Installing attrs (19.2.0.dev0 daf2bc8)
Run the same command again: $ poetry install
. Observe that Poetry fails with:
[SolverProblemError]
Because no versions of pytest match >=3.0,<3.10.1 || >3.10.1,<4.0
and pytest (3.10.1) depends on attrs (>=17.4.0), pytest (>=3.0,<4.0) requires attrs (>=17.4.0).
So, because no versions of attrs match >=17.4.0
and b depends on pytest (^3.0), version solving failed.
Same problem manifests itself for this version of attrs as a path
dependency. I tested a few other libraries and they don’t seem to be affected with the exception of mypy, which i believe is due to #611. #743 is a possibly related issue.
The problem can be mitigated by erasing the virtual environment removing poetry.lock
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
@oakkitten It will be fixed in the next beta release which should be out today or tomorrow.
looks like this issue is fixed in 1.0.0b5!