Skip to content

Proposal: METADATA file should be the last file within a wheel and should be uncompressed #397

@KOLANICH

Description

@KOLANICH

Rationale: wheels use zip archives. Zip archives don't allow gaps. It is a practically needed thing to edit wheels metadata. It can be done 3 ways:

  1. creating a new archive and copying files from an old one there.
    • waste of computation and disk space and IO ops. For flash - also extended and unneeded burn.
  2. splitting archive into 3 parts: before the file being replaced, the file being replaced, and after it. The part before is kept intact, then file is appended, then after part. Plus recomputation of the index. Closer the file being modified to the end - more we can keep intact. If METADATA file is the last one, then we only need to recompute the index.
  3. When a file is compressed, we cannot easily control its blob size in compressed form. When a file in zip archive is stored uncompressed, there is a bijection between uncompressed size and compressed size. If we keep the blob size intact, then we can replace the file in-place without recalculation of indexes and shifting parts after it. The only thing we need to recalculate is CRC.

So I propose:

About long description ... it may make sense to move it into an own file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions