-
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 exports incorrect requirements for transitive dependencies, breaks installation with hashes #4719
Comments
recent master gives
which seems satisfactory |
Any ETA for when that could make its way into a release? |
I think I might have come across this on poetry [tool.poetry]
name = "foo"
version = "1.2.3"
description = "foo"
authors = ["foo"]
[tool.poetry.dependencies]
python = "^3.7"
signedjson = "1.1.1"
matrix-common = "1.1.0"
[tool.poetry.dev-dependencies]
flake8 = "4.0.1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" If I run
However, signedjson 1.1.1 requires importlib_metadata unconditionally. Somehow, combining this with the other two requirements and exporting from the results makes this only required on Python 3.7. Quoting from the lockfile:
|
Using the same pyproject.toml and poetry@b06658f9a730b4d28b4b517d7f5c982514e524df I now get
which seems sensible to me. |
FWIW with 1.1.13, and this [tool.poetry]
name = "test2"
version = "0.1.0"
description = ""
authors = ["Shai Berger <shai@platonix.com>"]
[tool.poetry.dependencies]
python = "^3.10"
ipython = "^8.3.0"
pytest = "^7.1.2"
pytest-watch = "^4.2.0"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" we still get a similar failure on
This leads to failure when trying to pip-install the exported requirements on a non-Windows. |
pytest-watch publishes only a source distribution, forcing poetry to inspect its This is always going to be error-prone, packages that publish wheels with metadata or (even better) populate the JSON API at (say) https://pypi.org/pypi/pytest-watch/3.8.0/json will always give more reliable answers. ie don't bet the house on this being improved in later poetry releases; if you care, ask pytest-watch to improve their publishing process. |
Having said which, this example actually exposes #5593, so thanks for that! |
(was going to point out that all the relevant data is in |
anyway both the original issue and the new example are fixed on master, so probably this should be closed |
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 seems related to #3363, but I don't believe it's a duplicate, and I haven't seen this mentioned elsewhere.
When exporting
requirements.txt
, poetry will add incorrect implementation markers to the output, which in some cases can result in invalid requirement files when used with hashes:This happens because in the generated
requirements.txt
, the section forcffi
is as follows:Notice the
implementation_name == "pypy"
marker, even though the implementation used is CPython.The text was updated successfully, but these errors were encountered: