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

ParseConstraintError: Could not parse version constraint: ~3.4.* #3619

Closed
3 tasks done
tueda opened this issue Jan 30, 2021 · 2 comments
Closed
3 tasks done

ParseConstraintError: Could not parse version constraint: ~3.4.* #3619

tueda opened this issue Jan 30, 2021 · 2 comments
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues

Comments

@tueda
Copy link

tueda commented Jan 30, 2021

  • 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: Ubuntu 18.04.5 LTS (on WSL2 5.4.72)
  • Poetry version: 1.1.4 (from Linuxbrew)
  • Link of a Gist with the contents of your pyproject.toml file: see below.

Issue

poetry lock fails for the following pyproject.toml.

[tool.poetry]
name = "qleedback"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]

[tool.poetry.dependencies]
python = "^3.2"
importlib-metadata = [
   { version = "^0.23", python = "~3.4" },
]

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Updating dependencies
Resolving dependencies... (0.1s)

  ParseConstraintError

  Could not parse version constraint: ~3.4.*

  at /home/linuxbrew/.linuxbrew/Cellar/poetry/1.1.4/libexec/vendor/lib/python3.9/site-packages/poetry/core/semver/__init__.py:163 in parse_single_constraint
      159│             return VersionUnion(VersionRange(max=version), VersionRange(min=version))
      160│         else:
      161│             return version
      162│
    → 163│     raise ParseConstraintError(
      164│         "Could not parse version constraint: {}".format(constraint)
      165│     )
      166│

The full output of poetry lock -vvv is here.

This looks like #2645, which has already been fixed.

@tueda tueda added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 30, 2021
@finswimmer finswimmer added the status/duplicate Duplicate issues label Dec 27, 2021
@finswimmer
Copy link
Member

~3.4.* is not a valid PEP 440. This was discussed earlier, e.g.:

@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 status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants