-
-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add force_zip64 option #2711
base: main
Are you sure you want to change the base?
Conversation
zip64 is enabled by default, so shouldn't that obviate the need for forcing it to be enabled? |
@rickeylev for my case it doesnt seem to suffice.. this is the output of the failure for the current main (7d431d8), which then works with forcing zip64:
|
Oh hm. I think the usage of zip64 is inconsistent, depending on which zip APIs is used. ZipFile() says it defaults to allow_zip64=True. Meanwhile, ZipFile.open (the API used in this code), defaults to force_zip64=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Direction LGTM, but see comment
@@ -154,7 +156,7 @@ def arcname_from(name): | |||
hash = hashlib.sha256() | |||
size = 0 | |||
with open(real_filename, "rb") as fsrc: | |||
with self.open(zinfo, "w") as fdst: | |||
with self.open(zinfo, "w", force_zip64=self._force_zip64) as fdst: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just set force_zip64=True always. I don't think there's a disadvantage to always using zip64? Alternatively, stat() real_filename to get its size, and set it conditionally based on the size.
Currently, there is no possibility to pass the force zip64 option to the wheel creation. This hinders creation of packages that contain >2Gb files (e.g. large projects with debug symbols). This change adds an argument to pass the force_zip to the wheel file creation.