Skip to content

Filter Python executables on Windows by Python version metadata #13927

Description

@zanieb

See astral-sh/ruff#18550 (comment)

Windows Python executables seem to have the Python version embedded in their metadata. This may be faster than querying the Python interpreter to get its version, which would speed up Python discovery on Windows when a specific version is requested.

Activity

  1. zanieb commented on Jun 9, 2025

    @zanieb
    MemberAuthor

    See https://docs.rs/pelite/latest/pelite/resources/version_info/struct.VersionInfo.html

    I don't know if we want to add that as a dependency, but the object crate (which we use for PeFile currently) doesn't seem to include resource parsing.

  2. zanieb commented on Jun 12, 2025

    @zanieb
    MemberAuthor

    I took a shot at this in #13948 but ran into problems and don't have a Windows setup to debug easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions