You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Register .whl as a unpack format in shutil unpack #84027
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2020-03-04.10:24:15.384>labels= ['type-feature', 'library', '3.11']
title='Register .whl as a unpack format in shutil unpack'updated_at=<Date2021-10-25.23:43:48.319>user='https://github.com/chimeno'
I have run into this myself and was surprised unpack_archive didn't support wheels. I would like to see support added, and don't mind doing the work myself.
That said, I can see there being an issue with the number of supported zip-based formats ballooning: Java JARs, Android APKs etc.
However, wheels have a use case for easily extracting them -- that's how they're installed. I can't see a use case for being able to *easily* extract other formats.
If there's no opposition I will start work on a PR.
Activity
chimeno commentedon Mar 4, 2020
While working on project with Python wheels I found myself adding:
domdfcoding commentedon Jun 30, 2021
I have run into this myself and was surprised unpack_archive didn't support wheels. I would like to see support added, and don't mind doing the work myself.
That said, I can see there being an issue with the number of supported zip-based formats ballooning: Java JARs, Android APKs etc.
However, wheels have a use case for easily extracting them -- that's how they're installed. I can't see a use case for being able to *easily* extract other formats.
If there's no opposition I will start work on a PR.
pdxjohnny commentedon Oct 25, 2021
I ran into this today. Using a wrapper function around _make_zipfile due to
cpython/Lib/shutil.py
Lines 817 to 819 in d5650a1
pythongh-84027: Add whl as an unpack format in shutil
gh-84027: Add `whl` as an unpack format in `shutil` (#140385)
StanFromIreland commentedon Oct 30, 2026
This has now been added, and will be released in Python 3.16 thanks to @emmatyping! :-)