Skip to content

bpo-31638: Add compression support to zipapp #3819

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

Merged
merged 1 commit into from
Sep 29, 2017

Conversation

zmwangx
Copy link
Contributor

@zmwangx zmwangx commented Sep 29, 2017

Add optional argument compressed to zipapp.create_archive, and add option --compress to the command line interface of zipapp.

https://bugs.python.org/issue31638

Add optional argument `compressed` to `zipapp.create_archive`, and add
option `--compress` to the command line interface of `zipapp`.
@pfmoore
Copy link
Member

pfmoore commented Sep 29, 2017

Looks good to me. I'm actually tempted to consider defaulting to uncompressed as a bug, and simply switch to compressing by default. (When I implemented this, I never even considered that uncompressed was the default for ZipFile).

@brettcannon what's your view on this? The only compatibility issue I can see would be for Pythons built without zlib support. Is that something we'd need to consider? And if so, would having an --uncompressed flag to request the old behaviour be sufficient?

@brettcannon
Copy link
Member

The module needs to work with zlib not existing and it should default to uncompressed. I don't view adding a single boolean argument to a call burdensome if it makes people think about the trade-offs of compatibility and decompression overhead versus download/disk size.

@pfmoore
Copy link
Member

pfmoore commented Sep 29, 2017

OK, cool. Thanks for the clarification.

@pfmoore pfmoore merged commit d87b105 into python:master Sep 29, 2017
@pfmoore
Copy link
Member

pfmoore commented Sep 29, 2017

Thanks for the contribution, @zmwangx!

@zmwangx
Copy link
Contributor Author

zmwangx commented Sep 29, 2017

Thanks for the quick turnaround!

@zmwangx zmwangx deleted the zipapp-support-compression branch September 29, 2017 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants