Skip to content

Dependency resolution fails due to unnecessary upper bound #155

@justinmayer

Description

@justinmayer

Bug Report

Current Behavior

If you have a project that specifies Python in its pyproject.toml file like so:

[tool.poetry.dependencies]
python = ">=3.10,<4.0"

… and then try to add Hcloud-Python as a dependency:

poetry add hcloud

… dependency resolution will fail:

The current project's Python requirement (>=3.10,<4.0) is not compatible with some of the required packages Python requirement:

  • hcloud requires Python !=3.0., !=3.1., !=3.2., !=3.3., !=3.4.*, <3.11, so it will not be satisfied for Python >=3.11,<4.0

Because hcloud (1.17.0) requires Python !=3.0., !=3.1., !=3.2., !=3.3., !=3.4.*, <3.11
and no versions of hcloud match >1.17.0,<2.0.0, hcloud is forbidden.
So, because fortressa depends on hcloud (^1.17.0), version solving failed.

Expected behavior/code

The expected behavior is that dependency resolution would not fail.

Environment

  • Python Version: v3.10.5
  • Hcloud-Python Version: v1.17.0
  • Poetry 1.2.0b3

Possible Solution

The best way to address this problem is most likely to remove the upper bound from the relevant line in setup.py.

As was noted when the Black project dropped upper bounds:

"[Upper bounds] mostly cause unnecessary trouble."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions