question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to `poetry install` twisted trunk and treq

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Fedora 35
  • Poetry version: 1.1.12
  • Pyproject.toml:
    [tool.poetry]
    name = "test"
    version = "0.1.0"
    description = ""
    authors = ["David Robertson <david.m.robertson1@gmail.com>"]
    
    [tool.poetry.dependencies]
    python = "^3.10"
    Twisted = {git = "https://github.com/twisted/twisted.git", branch = "trunk"}
    treq = "^22.2.0"
    
    [tool.poetry.dev-dependencies]
    
    [build-system]
    requires = ["poetry-core>=1.0.0"]
    build-backend = "poetry.core.masonry.api"
    

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:

  • treq 22.2.0 requires "Twisted[tls] >= 18.7.0"
  • poetry deduces the set of possible twisted versions: 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).
  • This doesn’t include include twisted 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?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
callahadcommented, Apr 7, 2022

Workaround works. Suggest we can close this?

0reactions
radoeringcommented, Jun 4, 2022

The issue is not limited to locked repository (poetry lock --no-update or poetry add with existing lock file). It can be triggered without an existing poetry.lock just by running poetry lock with the given pyproject.toml. #5770 seems to solve all of these use cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing environments | master | Documentation - Poetry
Poetry makes project environment isolation one of its core features. What this means is that it will always work isolated from your global...
Read more >
Debian -- Пакеты исходного кода в "sid", Подсекция misc
... google-android-m2repository-installer (41+r1) [contrib]; google-android-sdk-docs-installer (24+r3) [contrib]; google-api-client-java (1.27.1-2) ...
Read more >
Compare Packages Between Distributions - DistroWatch.com
This page enables us to quickly perform a side-by-side comparison of the packages available in two different distributions, or in two different versions...
Read more >
A Poetic Apology. Or Why Should You Use Poetry to Manage…
Poetry is a CLI app written in Python so you can simply install it with pip install --user poetry . However, you probably...
Read more >
Full text of "The Manchester iris" - Internet Archive
^Literary and Enterti&ning Compositions, ' Poetic Effu- sions, ... Tbe critic has now merely to pomt out where the author has failed in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found