[issue19894] zipfile ignores deflate level settings in zipinfo object
New submission from Richard Milne: Reading the pkzip APPNOTE and the documentation for the zipfile module, I was under the impression that I could set the DEFLATE compression level, on a per-file basis, for each file added to an archive, by setting the appropriate bits in zipinfo.flag_bits. You can't. Hence the attached patch, which updates the docs, tests and module source to enables this ability and makes the user aware of it. ---------- assignee: docs@python components: Documentation, Library (Lib), Tests files: zipfileinfo.diff keywords: patch messages: 205284 nosy: docs@python, rmilne priority: normal severity: normal status: open title: zipfile ignores deflate level settings in zipinfo object type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32984/zipfileinfo.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19894> _______________________________________
Changes by Serhiy Storchaka <storchaka@gmail.com>: ---------- nosy: +alanmcintyre, serhiy.storchaka stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19894> _______________________________________
Serhiy Storchaka added the comment: This is new feature and can be added only in 3.5. ---------- assignee: docs@python -> components: -Documentation, Tests stage: patch review -> needs patch type: behavior -> enhancement versions: +Python 3.5 -Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19894> _______________________________________
Jens Diemer added the comment: IMHO it should be possible to set compression level not only for DEFLATE. And it should be similar with the tarfile API. Seems that http://bugs.python.org/issue21417 will cover this. ---------- nosy: +jens _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19894> _______________________________________
bbayles <bbayles@gmail.com> added the comment: This was fixed in issue 21417, in Github PR 5385: https://github.com/python/cpython/pull/5385 ---------- nosy: +bbayles _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue19894> _______________________________________
participants (4)
-
bbayles
-
Jens Diemer
-
Richard Milne
-
Serhiy Storchaka