-
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
Unable to poetry install
twisted trunk and treq
#5311
Comments
Did you try installing |
TL;DR you can workaround this by using the following add command for poetry add --extras tls git+https://github.com/twisted/twisted.git#trunk The root cause of this behaviour is the retrieval of poetry/src/poetry/mixology/version_solver.py Lines 359 to 367 in cf8999f
As the poetry/src/poetry/mixology/version_solver.py Lines 456 to 457 in cf8999f
The complete name check fails. This leads to the providers (ie. indexes) searched again for the right package with the extra Think there are a few improvements to be made here. The same package check from core needs to be improved to handle extras. |
Workaround works. Suggest we can close this? |
Think there is a root cause here that we should address, might leave this open so we can get that fixed. |
@abn This sounds a bit like #4618 @DMRobertson @callahad Can you try if the issue is still present in poetry 1.2.0b1? |
Looks like adding $ poetry add treq
Using version ^22.2.0 for treq
Updating dependencies
Resolving dependencies... (33.2s)
RuntimeError
[BUG] not twisted (22.2.0.post0 git rev trunk) is not satisfied.
at ~/workspace/python-poetry/poetry/src/poetry/mixology/partial_solution.py:206 in satisfier
202│ # As soon as we have enough assignments to satisfy term, return them.
203│ if assigned_term.satisfies(term):
204│ return assignment
205│
→ 206│ raise RuntimeError(f"[BUG] {term} is not satisfied.")
207│
208│ def satisfies(self, term: Term) -> bool:
209│ return self.relation(term) == SetRelation.SUBSET
210│ |
… hashes (#12439) The requirements file generated by `poetry export` isn't correctly processed by `pip install -r requirements.txt`. It contains twisted and treq, both pinned to 22.2.0. When `pip` installs treq, it notices that `Twisted[tls]` is required. It then tries to acquire the latest twisted release, only to fail (because this hash isn't listed in the requirements file).From e.g. https://github.com/matrix-org/synapse/runs/5977154990?check_suite_focus=true > ``` > #15 9.204 Collecting Twisted[tls]>=18.7.0 > #15 9.205 ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not: > #15 9.205 Twisted[tls]>=18.7.0 from https://files.pythonhosted.org/packages/db/99/38622ff95bb740bcc991f548eb46295bba62fcb6e907db1987c4d92edd09/Twisted-22.4.0-py3-none-any.whl#sha256=f9f7a91f94932477a9fc3b169d57f54f96c6e74a23d78d9ce54039a7f48928a2 (from treq==22.2.0->-r /synapse/requirements.txt (line 724)) > #15 ERROR: executor failed running [/bin/sh -c pip install --prefix="/install" --no-warn-script-location -r /synapse/requirements.txt]: exit code: 1 > ``` The underlying pip issue is pypa/pip#9644. A comment notes that one can avoid this behaviour with by `pip install`ing with the `--no-deps` flag. Let us do so. (At first glance, the problem looks like python-poetry/poetry#5311, but that was a bug in `poetry install`; this is `poetry export`, whose behaviour is fine AFAICS).
The issue is not limited to locked repository ( |
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
I tried to install twisted trunk and treq as follows:
poetry init
poetry add git+https://github.com/twisted/twisted.git#trunk
poetry add treq
Step three tried to install
treq ^22.2.0
which is the newest version. This failed: see add treq.txt.I find the output hard to read (not helped by Twisted's date-based versioning scheme), but I think what's happening is:
"Twisted[tls] >= 18.7.0"
Thus, treq (>=22.2.0,<23.0.0) requires twisted (18.7.0 || 18.9.0 || 19.2.0 || 19.2.1 || 19.7.0 || 19.10.0 || 20.3.0 || 21.2.0 || 21.7.0 || 22.1.0 || 22.2.0).
22.2.0.post0
, the trunk version; I'm guessing this isn't being considered and that's why resolution fails?I've also tried marking both with
allow_prereleases=true
but that didn't seem to change any behaviour---I'm guessing this refers to prereleases on PyPI rather than from-git prereleases.Am I doing something wrong here?
The text was updated successfully, but these errors were encountered: