You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mixed-case spec prefixes such as Python3.12 or GraalVM3.12 find no interpreter #270
_spec_from_match in src/python_discovery/_py_spec.py drops the generic py/python prefix and maps graalvm to graalpy, but only when the prefix is lowercase:
Everything downstream compares implementation names case-insensitively (PythonSpec.satisfies, PythonInfo._satisfies_implementation, the uv install filter, the IGNORECASE filename regex), so CPython3.12
works. Python3.12 instead keeps "Python" as the implementation. When a python3.12 executable is found on PATH,
the finder requires the interpreter to report that implementation. "python" != "cpython" rejects it, as it does the
current interpreter and uv installs. The spec only works if an executable with exactly that spelling, Python3.12, is
on PATH.
Reproducer (Windows, CPython 3.12 from uv, main at b7f7a6e):
It shows up in virtualenv (python-discovery 1.9.5): virtualenv -p python3.13 venv works, while virtualenv -p Python3.13 venv fails with RuntimeError: failed to find interpreter for Builtin discover of python_spec='Python3.13'.
Proposed fix: lowercase the prefix before checking the aliases. Happy to send a PR with tests.
Activity