Skip to content
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 fails to parse apache-libcloud's python version specification #4571

Closed
3 tasks done
deifactor opened this issue Sep 29, 2021 · 3 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@deifactor
Copy link

  • 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.

@deifactor deifactor added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 29, 2021
@deifactor
Copy link
Author

After looking into this, it looks like this is fixed in poetry-core, but that isn't in the latest version of poetry yet.

@finswimmer
Copy link
Member

Hello @deifactor,

please don't call it a fix. :) See here why python-poetry/poetry-core#186 (comment)

Related discussion: #4176

Yes, the workaround is not included in the current preview release (1.2.0a2).

fin swimmer

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants