Description
PythonSpec.from_string_spec("python.") raises IndexError because the parsed numeric version tuple is empty. The same happens for ., .., ..., cpython.., and pypy....
Reproducer:
from python_discovery import PythonSpec
PythonSpec.from_string_spec("python.")Reproduced with release 1.6.2 and source 469741a. This also aborts discovery when python. precedes a valid executable in the candidate list.
Expected: preserve the existing malformed-version behavior (as for python2.3.4.5) and treat the specification as a literal executable path. A missing literal candidate should allow trying the next candidate.
I have a narrow fix using the parser's existing ValueError fallback, with parser and interpreter-discovery regressions. I can submit it if this approach is suitable. AI assistance was used for source analysis, implementation, and verification; the reproduction and test results were checked locally.
Activity