[issue8199] zipfile.py: consistency between "write" and "writestr"
report at bugs.python.org
Mon Mar 22 09:52:13 CET 2010
New submission from Hervé Cauwelier <herve at itaapy.com>:
In class "ZipFile", method "write" accepts "compress_type" parameter but not the "writestr" method.
I see no reason for this limitation and the change is trivial.
This is needed for generating ODF documents since the mimetype file must not be compressed, contrary to other parts.
For now, I've copied the block of code that create a "ZipInfo" object in that "writestr" method.
The attached patch shows the desired change.
components: Library (Lib)
nosy: herve at itaapy.com
title: zipfile.py: consistency between "write" and "writestr"
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file16620/writestr-compress_type.diff
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list