python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.76k stars 2.27k forks source link

Can't install openapi-core #2119

Closed zupo closed 4 years ago

zupo commented 4 years ago
root@a0a63e3e4cf9:/foo# uname -a
Linux a0a63e3e4cf9 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@a0a63e3e4cf9:/foo# poetry --version
Poetry version 1.0.5
root@a0a63e3e4cf9:/foo# cat pyproject.toml 
[tool.poetry]
name = "foo"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]

[tool.poetry.dependencies]
python = "^3.6"

[tool.poetry.dev-dependencies]
pytest = "^5.2"

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

Issue

Can't install latest openapi-core:

root@a0a63e3e4cf9:/foo# poetry add openapi-core
Using version ^0.13.2 for openapi-core

Updating dependencies
Resolving dependencies... (0.9s)

[ValueError]
Could not parse version constraint: >="3.0"

Here's more verbose output:

root@a0a63e3e4cf9:/foo# poetry add openapi-core -vvv
Using virtualenv: /root/.cache/pypoetry/virtualenvs/foo-b2TG5iYf-py3.6
PyPI: 31 packages found for openapi-core *
Using version ^0.13.2 for openapi-core

Updating dependencies
Resolving dependencies...
   1: fact: foo is 0.1.0
   1: derived: foo
   1: fact: foo depends on openapi-core (^0.13.2)
   1: fact: foo depends on pytest (^5.2)
   1: fact: foo depends on pytest (^5.2)
   1: selecting foo (0.1.0)
   1: derived: pytest (^5.2)
   1: derived: openapi-core (^0.13.2)
PyPI: 11 packages found for pytest >=5.2,<6.0
PyPI: 1 packages found for openapi-core >=0.13.2,<0.14.0
PyPI: Getting info for openapi-core (0.13.2) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: openapi_core-0.13.2-py2-none-any.whl
PyPI: Downloading wheel: openapi_core-0.13.2-py3-none-any.whl
   1: Version solving took 1.090 seconds.
   1: Tried 1 solutions.

[ValueError]
Could not parse version constraint: >="3.0"

Traceback (most recent call last):
  File "/root/.poetry/lib/poetry/_vendor/py3.6/clikit/console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "/root/.poetry/lib/poetry/_vendor/py3.6/clikit/api/command/command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "/root/.poetry/lib/poetry/_vendor/py3.6/clikit/api/command/command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "/root/.poetry/lib/poetry/_vendor/py3.6/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File "/root/.poetry/lib/poetry/console/commands/add.py", line 149, in handle
    status = installer.run()
  File "/root/.poetry/lib/poetry/installation/installer.py", line 74, in run
    self._do_install(local_repo)
  File "/root/.poetry/lib/poetry/installation/installer.py", line 161, in _do_install
    ops = solver.solve(use_latest=self._whitelist)
  File "/root/.poetry/lib/poetry/puzzle/solver.py", line 36, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "/root/.poetry/lib/poetry/puzzle/solver.py", line 181, in _solve
    self._package, self._provider, locked=locked, use_latest=use_latest
  File "/root/.poetry/lib/poetry/mixology/__init__.py", line 7, in resolve_version
    return solver.solve()
  File "/root/.poetry/lib/poetry/mixology/version_solver.py", line 80, in solve
    next = self._choose_package_version()
  File "/root/.poetry/lib/poetry/mixology/version_solver.py", line 378, in _choose_package_version
    version = self._provider.complete_package(version)
  File "/root/.poetry/lib/poetry/puzzle/provider.py", line 550, in complete_package
    repository=package.dependency.source_name,
  File "/root/.poetry/lib/poetry/repositories/pool.py", line 115, in package
    package = repo.package(name, version, extras=extras)
  File "/root/.poetry/lib/poetry/repositories/pypi_repository.py", line 161, in package
    release_info = self.get_release_info(name, version)
  File "/root/.poetry/lib/poetry/repositories/pypi_repository.py", line 278, in get_release_info
    '{}:{}'.format(name, version), lambda: self._get_release_info(name, version)
  File "/root/.poetry/lib/poetry/_vendor/py3.6/cachy/repository.py", line 174, in remember_forever
    val = value(callback)
  File "/root/.poetry/lib/poetry/_vendor/py3.6/cachy/helpers.py", line 6, in value
    return val()
  File "/root/.poetry/lib/poetry/repositories/pypi_repository.py", line 278, in <lambda>
    '{}:{}'.format(name, version), lambda: self._get_release_info(name, version)
  File "/root/.poetry/lib/poetry/repositories/pypi_repository.py", line 345, in _get_release_info
    info = self._get_info_from_urls(urls)
  File "/root/.poetry/lib/poetry/repositories/pypi_repository.py", line 420, in _get_info_from_urls
    for r in info["requires_dist"]
  File "/root/.poetry/lib/poetry/repositories/pypi_repository.py", line 420, in <genexpr>
    for r in info["requires_dist"]
  File "/root/.poetry/lib/poetry/packages/__init__.py", line 39, in dependency_from_pep_508
    req = Requirement(name)
  File "/root/.poetry/lib/poetry/version/requirements.py", line 232, in __init__
    self.constraint = parse_constraint(constraint)
  File "/root/.poetry/lib/poetry/semver/__init__.py", line 31, in parse_constraint
    constraint_objects.append(parse_single_constraint(and_constraints[0]))
  File "/root/.poetry/lib/poetry/semver/__init__.py", line 162, in parse_single_constraint
    raise ValueError('Could not parse version constraint: {}'.format(constraint))

Possibly caused by this line in openapi-core?

abn commented 4 years ago

@zupo based on the discussion on #2144 think this one would be an issue in the openapi-core package metadata. See https://github.com/python-poetry/poetry/pull/2144#issuecomment-596156145.

zupo commented 4 years ago

Fixed with https://github.com/p1c2u/openapi-core/pull/214.

github-actions[bot] commented 8 months ago

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.