-
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 doesn't respect version specifiers in Requires-Dist for dependencies #2946
Comments
Note, this same dependency check will continue to fail if you do something completely unrelated to |
@f0ff886f can you try with the latest pre-release please? Also, fwiw, I am unable to reproduce this. $ cat pyproject.toml
[tool.poetry]
name = "foo"
version = "0.16.0"
description = ""
authors = ["Author <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.6"
httpx = "^0.13.3"
colorama = "^0.4.3"
click = "^7.0"
rich = "^3.1.0"
importlib-metadata = "^1.7.0"
[tool.poetry.dev-dependencies]
black = "^19.10b0"
flake8 = "^3.7.9"
[tool.poetry.scripts]
ovat = 'client.cli:main'
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
$ [email protected] add rich@latest
Using version ^7.0.0 for rich
Updating dependencies
Resolving dependencies... (0.2s)
Writing lock file
Package operations: 0 installs, 1 update, 1 removal
- Updating rich (3.4.1 -> 7.0.0)
- Removing pprintpp (0.4.0)
$ [email protected] remove httpx
Updating dependencies
Resolving dependencies... (0.1s)
Writing lock file
Package operations: 0 installs, 0 updates, 14 removals
- Removing certifi (2020.6.20)
- Removing chardet (3.0.4)
- Removing contextvars (2.4)
- Removing h11 (0.9.0)
- Removing h2 (3.2.0)
- Removing hpack (3.0.0)
- Removing hstspreload (2020.9.22)
- Removing httpcore (0.9.1)
- Removing httpx (0.13.3)
- Removing hyperframe (5.2.0)
- Removing idna (2.10)
- Removing immutables (0.14)
- Removing rfc3986 (1.4.0)
- Removing sniffio (1.1.0) |
This just got a ton weirder after updating to 1.1.0b3. Things looked promising to start!
And re-applying things:
What the heck 🤔 I don't know how to explain this. |
I can reproduce this by replacing Rich with another temporary library that expresses the same dependency on I have noticed that things like black and pydantic require Yet still, if I manually add the dependencies to the pyproject.toml, |
Is it not suspicious that it appears to be asking for Rich greater than 7.0.0, when rich is currently = 7.0.0? |
I had a friend try the same project with The friend was able to at least @willmcgugan I never really realized that it could be a problem. Let me change the version specifier and see what happens. edit: nope, that didn't help. |
@abn downgrading to So I'll just wait for 1.1.0b5... 👍 I really appreciate the help. |
Hello, thank you for the work in 1.1.0rc1! I can confirm this bug is gone and I have a fully working and perfectly working Poetry! |
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).Issue
This is related to but doesn't seem to be directly addressed by the many "Python requirement (^3.6) is not compatible with some of the required packages" issues. Closest issue is #2840 and the solution #1930 (comment) doesn't apply here.
My library is expressing it is compatible with Python ^3.6, which I understand as >=3.6.0, < 4.0.0.
It requires the https://github.com/willmcgugan/rich library which is compatible also with Python ^3.6. The issues starts with Rich's dependency on dataclasses which started to throw a wrench in many people's plans it seems by declaring its Python requirement as
>=3.6, <3.7
(^3.7 has dataclasses built in).Now Rich declares its dependency like so:
Requires-Dist: dataclasses (>=0.7,<0.8); python_version >= "3.6" and python_version < "3.7"
When dataclasses is added as a dependency with
python_version ~3.6
directly to this project, it resolves dataclasses just fine (which I understand is just shorthand for>=3.6, <3.7
).But now, when Rich tries to do the same, and I depend on Rich, everything breaks and cannot continue.
The posted solution says to use python_version specifiers, but I cannot do that for Rich, but Rich itself does that and Poetry seems to ignore it.
The workaround is to manually specify
rich = "^7.0.0"
in the[tool.poetry.dependencies]
and then something likepoetry update
works just fine.The text was updated successfully, but these errors were encountered: