(๐) Fails entirely when there are dependency conflicts
KotlinIsland opened this issue ยท 2 comments
KotlinIsland commented
[tool.poetry]
name = "demo"
version = "1"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.11"
greenlet = "^3.0.1" # latest is 3.0.3
playwright = "^1.39.0" # latest is 1.40.0, which depends on greenlet==3.0.1
pydantic = "^2" # latest is 2.5.3
> poetry up
Updating dependencies
Resolving dependencies... (0.1s)
Reverting pyproject.toml
Because no versions of playwright match >1.40.0,<2.0.0
and playwright (1.40.0) depends on greenlet (3.0.1), playwright (>=1.40.0,<2.0.0) requires greenlet (3.0.1).
So, because demo depends on both greenlet (^3.0.3) and playwright (^1.40.0), version solving failed.
Here I would imagine that playwright gets updated, and greenlet doesn't. Instead, no dependencies at all get updated, not even the completely unrelated Pydantic.
nbro10 commented
I'm also getting a similar error when trying to update the following dependencies
mypy = "0.950"
pylint = "2.17.7"
flake8 = "3.9.0"
flake8-docstrings = "^1.6.0"
black = "~23.1"
isort = "^5.10.1"
with poetry up mypy pylint flake8 flake8-docstrings black isort
.
The specific error is
The current project's supported Python range (>=3.7.2,<3.11) is not compatible with some of the required packages Python requirement:
- isort requires Python >=3.8.0, so it will not be satisfied for Python >=3.7.2,<3.8.0
Because isort (5.13.2) requires Python >=3.8.0
and no versions of isort match >5.13.2,<6.0.0, isort is forbidden.
So, because cornucopia depends on isort (^5.13.2), version solving failed.
โข Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
For isort, a possible solution would be to set the `python` property to ">=3.8.0,<3.11"
https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
https://python-poetry.org/docs/dependency-specification/#using-environment-markers
Poetry version: 1.7.0
Python version: 3.8.18
OttoAndrey commented
I have same problem but for django
and django-celery-beat
django = "^4.2.10"
django-celery-beat = "^2.5.0"
poetry up --latest
Because django-celery-beat (2.5.0) depends on Django (>=2.2,<5.0)
and non-package-mode depends on django (^5.0.2), django-celery-beat is forbidden.
So, because non-package-mode depends on django-celery-beat (2.5.0), version solving failed.
Updating start working if lock django version as
django = "4.2.10"