]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89739: gh-77140: Support zip64 in zipimport (GH-94146)
authorTim Hatch <tim@timhatch.com>
Thu, 28 Mar 2024 06:54:51 +0000 (23:54 -0700)
committerGitHub <noreply@github.com>
Thu, 28 Mar 2024 06:54:51 +0000 (06:54 +0000)
commitb44898299a2ed97045c270f6474785da2ff07ced
tree3cca65e4c9fbf1d34ed10d8656609d5370e23cdc
parent2cedd25c14d3acfdcb5e8ee55132ce3e334ab8fe
gh-89739: gh-77140: Support zip64 in zipimport (GH-94146)

* Reads zip64 files as produced by the zipfile module
* Include tests (somewhat slow, however, because of the need to create "large" zips)
* About the same amount of strictness reading invalid zip files as zipfile has
* Still works on files with prepended data (like pex)

There are a lot more test cases at https://github.com/thatch/zipimport64/ that give me confidence that this works for real-world files.

Fixes #89739 and #77140.

---------

Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
Reviewed-by: Gregory P. Smith <greg@krypto.org>
Doc/library/zipimport.rst
Doc/whatsnew/3.13.rst
Lib/importlib/_bootstrap_external.py
Lib/test/test_zipimport.py
Lib/zipimport.py
Misc/NEWS.d/next/Library/2022-06-22-14-45-32.gh-issue-89739.CqZcRL.rst [new file with mode: 0644]