Skip to content

Published wheel contains stale __pycache__ bytecode from a dirty build tree #643

Description

@sethc555

The published imapclient 3.1.0 wheel contains imapclient/__pycache__/__init__.cpython-37.pyc, imapclient/__pycache__/config.cpython-37.pyc, imapclient/__pycache__/datetime_util.cpython-37.pyc, imapclient/__pycache__/exceptions.cpython-37.pyc, imapclient/__pycache__/fixed_offset.cpython-37.pyc, imapclient/__pycache__/imap4.cpython-37.pyc — compiled bytecode from older Pythons that a clean build of the sdist does not produce. It bloats the wheel, and bytecode without matching reviewable source in the artifact is worth avoiding on principle. A rebuild from a clean tree (or excluding __pycache__ at build time) fixes it on the next release.

Found by a wheel/sdist divergence census of popular PyPI packages (wheelproof, results/divergence.md); self-check with wheelproof divcheck --package <name>. Verified twice in clean python:3.12 containers with exact file-list agreement.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions