Skip to content

Python version pins need to be combined with Requires-Python #5228

@zanieb

Description

@zanieb

As briefly discussed at #4989 (comment)

When reading pins from .python-version files in workspaces, the Requires-Python information may need to be layered to resolve the correct Python interpreter e.g. with

  • 3.10 and 3.12 on the PATH
  • A project that requires >=3.11
  • And a pin of cpython

We will currently resolve to 3.10 since ignore the project Python requirement entirely when there is a pin.

Instead, we should combine the PythonRequest::Implementation and the Requires-Python into a PythonRequest::ImplementationVersion(..., VersionRequest::Range(...)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions