-
Consider a project that supports a wide range of Python version, and with a single dependency, like this: [tool.poetry.dependencies]
python = ">=3.7.2"
setuptools = ">=68.0.0"
However, when I am using any newer Python version (>=3.8) on this project, Poetry still installs setuptools This seems wrong to me, as I would expect Poetry to install I have found a way to "convince" Poetry to follow my expectations: [tool.poetry.dependencies]
python = ">=3.7.2"
setuptools = [
# v68.1.0 drops support for Python v3.7:
{version = ">=68.0.0", python = ">=3.8"},
{version = ">=68.0.0,<68.1.0", python = "<3.8"},
] I consider this to be an ugly workaround as it repeats setuptools' own limitation in my Is this a bug in Poetry, or have I misunderstood something in my expectations of what Poetry should do here? (I've created a minimal example at https://github.com/jherland/poetry_overspecify_deps_demo to demonstrate this issue.) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
(BTW, this is reproducible both in Poetry v1.6.1 and v1.7.1) |
Beta Was this translation helpful? Give feedback.
-
Not a bug, but rather a shortcoming or missing feature, which is missing because of its complexity and performance overhead. Poetry does not split up a dependency by itself. If you specify |
Beta Was this translation helpful? Give feedback.
Not a bug, but rather a shortcoming or missing feature, which is missing because of its complexity and performance overhead. Poetry does not split up a dependency by itself. If you specify
setuptools = ">=68.0.0"
, Poetry will try to find one version ofsetuptools
that is suitable for all supported Python versions.