[issue11981] dupe self.fp.tell() in zipfile.ZipFile.writestr
Roundup Robot added the comment: New changeset d51665f9a416 by Ezio Melotti in branch 'default': #11981: remove duplicate line. Patch by Johan Euphrosine. http://hg.python.org/cpython/rev/d51665f9a416 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org 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
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: - ezio.melotti resolution: - fixed stage: commit review - committed/rejected status: open - closed versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org 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
Serhiy Storchaka added the comment: LGTM. -- stage: - commit review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org 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 Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org 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
Alan McIntyre alan.mcint...@gmail.com added the comment: I also can't see any file operations that might occur between the two .tell() calls, and a full test pass (including test_zipfile64) on the py3k development branch doesn't turn up any problems on Linux (2.6.38, x86_64) for me, so I agree the second .tell() could be removed. -- ___ Python tracker rep...@bugs.python.org 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
Ezio Melotti ezio.melo...@gmail.com added the comment: I double checked the code on py3k and I think the second occurrence can be removed. -- nosy: +alanmcintyre versions: +Python 3.3 -Python 3.4 ___ Python tracker rep...@bugs.python.org 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
Ezio Melotti ezio.melo...@gmail.com added the comment: Can you prove that the second one is useless (did it cause you any problem or did you just find it reading the source)? There might be reasons why there are two calls to fp.tell() (e.g. the result is different in the two places and/or zinfo.header_offset is read/changed somewhere else between the two calls). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org 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 pro...@google.com 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 rep...@bugs.python.org 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 pro...@google.com 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 rep...@bugs.python.org 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 pro...@google.com: -- 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 rep...@bugs.python.org http://bugs.python.org/issue11981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com