-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poetry install --sync
and poetry update
install different packages based on transitive extras
#8380
Comments
Probably related to what's going on with the two lines in the [[package]]
name = "django-stubs"
version = "4.2.3"
description = "Mypy stubs for Django"
optional = false
python-versions = ">=3.8"
files = [
{file = "django-stubs-4.2.3.tar.gz", hash = "sha256:dadab39b46d9ae8f37a8e879c590f39a9e042b565c03fa0c5a8f754b441b1f23"},
{file = "django_stubs-4.2.3-py3-none-any.whl", hash = "sha256:e30e2e4927ba14bec587ed2c686404b6b8e473cabe9baca445e7d2e1e0d7b14f"},
]
[package.dependencies]
django = "*"
django-stubs-ext = ">=4.2.2"
mypy = [
{version = ">=1.0.0", optional = true, markers = "extra != \"compatible-mypy\""},
{version = "==1.4.*", optional = true, markers = "extra == \"compatible-mypy\""},
]
... |
Inside the wheel
|
This bug can be reproduced even without the [tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.10, <3.12"
[tool.poetry.group.dev.dependencies]
django-stubs = { version = "4.2.3", extras = ["compatible-mypy"] }
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" Inspecting the the lockfile also shows that both Mypy |
That's a pretty interesting issue. As it seems it's a regression from 1.5 introduced via #7257, which unknowingly removed some untested special handling for extras. However, extras are not like other markers (see python-poetry/poetry-core#636). It's not like extra handling was more correct before #7257, it was just correct in other cases (like this one). See #8399 for a solution. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option) and have included the output below.Issue
django-stubs
provides anextras
to allow users to ensure that a compatible version of mypy is resolved:This extra requires mypy
1.4.*
, but Poetry locks1.5.1
in the lockfile.poetry.lock
Even more strange,
poetry install --sync
andpoetry update
will do different things:The text was updated successfully, but these errors were encountered: