Skip to content

poetry fails to parse apache-libcloud's python version specification #4571

@deifactor

Description

@deifactor
  • 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: macOS 11.6
  • Poetry version: 1.2.0a2
  • Link of a Gist with the contents of your pyproject.toml file: See below

Issue

Trying to lock the following pyproject.toml fails:

[tool.poetry]
name = "badver"
version = "0.1.0"
description = ""
authors = ["Ash <ext0l@catgirl.ai>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.7"
apache-libcloud = "^3.1"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

The error message ultimately ends in

  Could not parse version constraint: >=3.5.*

  at ~/Library/Application Support/pypoetry/venv/lib/python3.7/site-packages/poetry/core/semver/helpers.py:140 in parse_single_constraint
      136│         try:
      137│             version = Version.parse(version)
      138│         except ValueError:
      139│             raise ValueError(
    → 140│                 "Could not parse version constraint: {}".format(constraint)
      141│             )
      142│
      143│         if op == "<":
      144│             return VersionRange(max=version)

and I think this is because of a line with python_requires=">=3.5.*, <4", in apache-libcloud's setup.py file.

I could try to git them to rephrase their dependencies, but I'd like to be able to install already-existing versions of packages.

This seems related to #3619.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions