[issue40233] Awkward to set compression on writeable ZipFile.open()

Daniel Holth report at bugs.python.org
Wed Apr 8 19:14:05 EDT 2020


New submission from Daniel Holth <dholth at fastmail.fm>:

It looks like this is the current API to set compression at the individual file level when writing with ZipFile.open()

        z.compression = zipfile.ZIP_STORED
        data_writer = z.open(zip_info or filename, "w")
        z.compression = saved

It would be useful to have a parameter or to honor the compression setting of the passed ZipInfo.

----------
components: Library (Lib)
messages: 366028
nosy: alanmcintyre, dholth, serhiy.storchaka, twouters
priority: normal
severity: normal
status: open
title: Awkward to set compression on writeable ZipFile.open()
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40233>
_______________________________________


More information about the Python-bugs-list mailing list