python-poetry/poetry

Unable to resolve non-SemVer 4-part version numbers of Python stubs

albertvillanova opened this issue · 4 comments

Description

The versions of Python third-party stub packages consist of four parts, like 2.32.0.20240523 (see: types-requests-2.32.0.20240523). More info in their README: https://github.com/python/typeshed?tab=readme-ov-file#package-versioning-for-third-party-stubs

However Poetry cannot resolve these packages and it hangs indefinitely.

For example, when executing poetry update types-requests with any of the following dependency specifications:

  • Caret: types-requests = "^2.32"
  • Tilde: types-requests = "~2.32"
  • Wildcard: types-requests = "2.32.*"
  • Inequality: types-requests = ">=2.32"
  • Exact requirement: types-requests = "2.32.0.20240523"

Workarounds

No workaround.

Poetry Installation Method

pipx

Operating System

Ubuntu 20.04

Poetry Version

1.8.2

Poetry Configuration

cache-dir = "~/.cache/pypoetry"
experimental.new-installer = true
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # ~/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = true
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true

Python Sysconfig

No response

Example pyproject.toml

No response

Poetry Runtime Logs

Updating dependencies
Resolving dependencies... (451.1s)^C

Please follow the bug template and run with -vvv. For me, it's instant. For you, it could be slow downloading, it could be waiting for a password, I can't tell.