This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author takluyver
Recipients mbussonn, serhiy.storchaka, takluyver
Date 2016-01-17.10:48:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453027725.11.0.970381737416.issue26039@psf.upfronthosting.co.za>
In-reply-to
Content
zipinfo-from-file.patch has an orthogonal but related change: the code in ZipFile.write() to construct a ZipInfo object from a filesystem file is pulled out to a classmethod ZipInfo.from_file().

Together, these changes make it much easier to control how a file is written to a zip file, like this:

zi = ZipInfo.from_file(blah)
# ... manipulate zi...
with open(blah, 'rb') as src, zf.open(zi, 'w') as dest:
    # copy of the read/write loop - maybe this should be
    # pulled out separately as well?

If these changes make it in, I might put a backported copy of the module on PyPI so I can start using it without waiting for Python 3.6.
History
Date User Action Args
2016-01-17 10:48:45takluyversetrecipients: + takluyver, serhiy.storchaka, mbussonn
2016-01-17 10:48:45takluyversetmessageid: <1453027725.11.0.970381737416.issue26039@psf.upfronthosting.co.za>
2016-01-17 10:48:45takluyverlinkissue26039 messages
2016-01-17 10:48:44takluyvercreate