Skip to content

get_metadata_for_wheel() may return wrong metadata #1146

@tiran

Description

@tiran

get_metadata_for_wheel returns the first match for name.endswith(".dist-info/METADATA"). This is a bad assumption. A wheel can contain multiple .dist-info directories. It's common to include dist-info directories of vendored packages.

get_metadata_for_wheel should only look at dist-info directories in the root of the wheel. Or better: parse the URL, split the name, and use {dist_name}-{dist_version}.dist-info/METADATA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions