Skip to content

gh-84027: Add whl as an unpack format in shutil - #140385

Merged
StanFromIreland merged 6 commits into
python:mainfrom
emmatyping:shutil-unpack-whl
Oct 30, 2026
Merged

StanFromIreland merged 6 commits into
python:mainfrom
emmatyping:shutil-unpack-whl

Conversation

@emmatyping

@emmatyping emmatyping commented Oct 20, 2025 •

Copy link
Copy Markdown
Member

Wheels are the most ubiquitous Python package format. Per the wheel format specification, "A wheel is a ZIP-format archive with a specially formatted file name and the .whl extension."

To enable unpacking of wheels for inspection or even installation, we register the format in shutil using shutil._unpack_zipfile to do the actual unpacking.

Also, I would say we should only do this with wheels because they are Python packages. I don't want to set the precedent that we register all zip based formats :)

Wheels are the most ubiquitous Python package format. Per [the wheel
format
specification](https://packaging.python.org/en/latest/specifications/binary-distribution-format/),
"A wheel is a ZIP-format archive with a specially formatted file name
and the .whl extension."

To enable unpacking of wheels for inspection or even installation, we
register the format in shutil using shutil._unpack_zipfile to do the
actual unpacking.
@giampaolo
giampaolo removed their request for review October 20, 2025 20:15
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 1, 2026
@StanFromIreland

Copy link
Copy Markdown
Member

This has conflicts now, please ping me for review when they're fixed and let's land this :-)

@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 16, 2026
@StanFromIreland

Copy link
Copy Markdown
Member

Little ping @emmatyping :-)

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs some docs updates, and we should also test the extension itself. I put up a PR with those suggestions: emmatyping#24

@emmatyping
emmatyping requested a review from AA-Turner as a code owner October 30, 2026 00:56
@read-the-docs-community

read-the-docs-community Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Comment thread Doc/library/shutil.rst Resolved
Comment thread Doc/library/shutil.rst Resolved
@StanFromIreland
StanFromIreland enabled auto-merge (squash) October 30, 2026 10:04
@StanFromIreland StanFromIreland changed the title gh-84027: Add whl as an unpack format in shutil gh-84027: Add whl as an unpack format in shutil Oct 30, 2026
@StanFromIreland
StanFromIreland enabled auto-merge (squash) October 30, 2026 10:04
@StanFromIreland
StanFromIreland merged commit 025fe55 into python:main Oct 30, 2026
56 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants