[issue11980] zipfile.ZipFile.write should accept fp as argument
New submission from Johan Euphrosine : Currently it only accept a filename (and writestr only accept bytes). -- components: Library (Lib) messages: 134989 nosy: Johan.Euphrosine priority: normal severity: normal status: open title: zipfile.ZipFile.write should accept fp as argument type: feature request versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue11980> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11981] duplicated self.fp.tell() in zipfile.ZipFile.writestr
New submission from Johan Euphrosine : See: http://hg.python.org/cpython/file/2e3346fc880f/Lib/zipfile.py#l1168 http://hg.python.org/cpython/file/2e3346fc880f/Lib/zipfile.py#l1182 -- messages: 134990 nosy: Johan.Euphrosine priority: normal severity: normal status: open title: duplicated self.fp.tell() in zipfile.ZipFile.writestr versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue11981> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11981] duplicated self.fp.tell() in zipfile.ZipFile.writestr
Changes by Johan Euphrosine : -- components: +Library (Lib) type: -> performance ___ Python tracker <http://bugs.python.org/issue11981> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr
Changes by Johan Euphrosine : -- keywords: +patch title: duplicated self.fp.tell() in zipfile.ZipFile.writestr -> dupe self.fp.tell() in zipfile.ZipFile.writestr Added file: http://bugs.python.org/file21870/zipfile-fix-dupe-fp-tell.patch ___ Python tracker <http://bugs.python.org/issue11981> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11980] zipfile.ZipFile.write should accept fp as argument
Johan Euphrosine added the comment: Here is a tentative implementation. Feel free to review it. -- keywords: +patch Added file: http://bugs.python.org/file21871/zipfile-add-writefp.patch ___ Python tracker <http://bugs.python.org/issue11980> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr
Johan Euphrosine added the comment: I just find it while reading the source, for fixing #11980 zinfo.header_offset is only read in self._write_check, and it seems to me that no file operation are performed on self.fp between the two call. So I can't see see how it could different. Also the tests suite still pass after removing the second one :) Let me know if you want me to do more investigation. -- ___ Python tracker <http://bugs.python.org/issue11981> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr
Johan Euphrosine added the comment: Here is a log that shows zinfo.header_offset value after each .tell() when running test_zipfile -- Added file: http://bugs.python.org/file21895/zinfo.header_offset.log ___ Python tracker <http://bugs.python.org/issue11981> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com