Skip to content

Implement PEP-714 - Rename dist-info-metadata #997

@dralley

Description

@dralley

PEP-714 describes a specification change which is designed to work around an unfortunate ecoystem bug

PEP 658 specified a mechanism to host the core metadata files from an artifact available through the Simple API such that a client could fetch the metadata and use it without having to download the entire artifact. Later PEP 691 was written to add the ability to use JSON rather than HTML on the Simple API, which included support for the PEP 658 metadata.

Unfortunately, PyPI did not support PEP 658 until just recently, which released with a bug where the dist-info-metadata key from PEP 658 was incorrectly named in the JSON representation, to be data-dist-info-metadata. However, when attempting to fix that bug, it was discovered that pip also had a bug, where any use of dist-info-metadata in the JSON representation would cause pip to hard fail with an exception.

The bug in pip has existed since at least v22.3, which means that it has been released for approximately 8 months, long enough to have been pulled into Python releases, downstream Linux releases, baked into containers, virtual environments, etc.

This puts us in an awkward position of having a bug on PyPI that cannot be fixed without breaking pip, due to a bug in pip, but that version of pip is old enough to have been widely deployed. To make matters worse, a version of pip that is broken in this way cannot install anything from PyPI once it fixes its bug, including installing a new, fixed version of pip.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions