[issue14099] zipfile: ZipFile.open() should not reopen the underlying file

2012-02-23 Thread Stepan Kasal
Stepan Kasal added the comment: Attached please find a patch that fixes this issue by reusing the original fp from ZipFile object. Two of the test cases attempted to read a file from a zip as soon as write() was called. I believe that this is not correct usage: zip file is not even fully wr

[issue14099] zipfile: ZipFile.open() should not reopen the underlying file

2012-02-23 Thread Matej Cepl
Changes by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue14099] zipfile: ZipFile.open() should not reopen the underlying file

2012-02-23 Thread Stepan Kasal
New submission from Stepan Kasal : When a file inside a zip is open, the underlying zip file is open again. (Unless the file name is unknown, because the ZipFile object was created with fp only.) This design is incorrect, insecure, and ineffective: - the reopen uses the same string as file name