Skip to content

[REQUEST]: Improve requires-python resolution #14

@richieadler

Description

@richieadler

Prerequisites

  • I have searched the issues and believe that it has not already been requested (and possibly rejected)
  • I have made sure that this feature isn't possible with this project's plugin system and/or configuration; core changes must be made to make this happen.
  • I agree to follow the Code of Conduct

Feature description

Improve the logic to re-use existing venvs for valid requires-python clauses.

Rationale

Currently requires-python tries to find the higher Python available and creates a venv accordingly, even if the clause would be satisfied by an existing venv.

Scenario:

  • Windows 11
  • Python 3.11.9 and 3.12.3 installed
  • requires-python = ">=3.11,<3.12"

Script runs with 3.11.9 correctly.

  • Changed to requires-python = ">=3.11"

It creates a new 3.12.3 venv instead of using the pre-existing 3.11.9 for which the requires-python clause is still valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions