You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Python ^3.7 or ^3.8 in your pyproject.toml file (i.e. the default values that Poetry generates) prevents adding this package via poetry add:
[SolverProblemError]
The current project's Python requirement (^3.8) is not compatible with some of the required packages Python requirement:
- flake8-annotations requires Python >=3.6.1,<3.9
Because no versions of flake8-annotations match >2.2.0,<3.0.0
and flake8-annotations (2.2.0) requires Python >=3.6.1,<3.9, flake8-annotations is forbidden.
So, because tool-belt depends on flake8-annotations (^2.2.0), version solving failed.
To Reproduce
poetry init --no-interaction to initialize a new Poetry project.
The python version in your pyproject.toml file will be ^3.8 or ^3.7 by default
poetry add flake8 (works fine)
poetry add flake8-annotations (throws the error described above)
The default caret requirement of, say ^3.8, tells Poetry that your project is compatible with [3.8, 4.0), but we currently do not guarantee compatibility with >=3.9 so this is technically an incompatibility. This can be solved with a tilde requirement, ~3.8, which would describe compatibility with [3.8, 3.9).
While our dependency pinning change (see: e2f9452) is technically correct, I'm not sure it's worthwhile to insist on this if it clashes with existing project specs; in principle it's worthwhile, but it's not a hill worth dying on.
Describe the bug
Using Python
^3.7
or^3.8
in yourpyproject.toml
file (i.e. the default values that Poetry generates) prevents adding this package viapoetry add
:To Reproduce
poetry init --no-interaction
to initialize a new Poetry project.pyproject.toml
file will be^3.8
or^3.7
by defaultpoetry add flake8
(works fine)poetry add flake8-annotations
(throws the error described above)Version Information
The text was updated successfully, but these errors were encountered: