Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(714)

#6818: remove/delete method for zipfile/tarfile objects

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years, 2 months ago by rossmclendon
Modified:
1 year ago
Reviewers:
martin, ubershmekel
CC:
loewis, rhettinger, terry.reedy, lars.gustaebel, rossmclendon_tamu.edu, eric.araujo, ubershmekel, victorlee129_gmail.com, sandro.tosi, troy.potts_gmail.com, Arthur.Darcet
Visibility:
Public.

Patch Set 1 #

Total comments: 10

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/zipfile.rst View 1 chunk +10 lines, -0 lines 0 comments Download
Lib/test/test_zipfile.py View 1 1 chunk +106 lines, -1 line 0 comments Download
Lib/zipfile.py View 1 6 chunks +129 lines, -60 lines 0 comments Download

Messages

Total messages: 2
loewis
http://bugs.python.org/review/6818/diff/2034/3872 File Doc/library/zipfile.rst (right): http://bugs.python.org/review/6818/diff/2034/3872#newcode255 Doc/library/zipfile.rst:255: :exc:`RuntimeError`. This needs a versionadded macro. http://bugs.python.org/review/6818/diff/2034/3873 File Lib/test/test_zipfile.py ...
2 years, 2 months ago #1
ubershmekel
1 year ago #2
These were all taken care of in zipfile.remove.2.patch

http://bugs.python.org/review/6818/diff/2034/3872
File Doc/library/zipfile.rst (right):

http://bugs.python.org/review/6818/diff/2034/3872#newcode255
Doc/library/zipfile.rst:255: :exc:`RuntimeError`.
On 2011/03/14 01:13:59, loewis wrote:
> This needs a versionadded macro.

Done.

http://bugs.python.org/review/6818/diff/2034/3873
File Lib/test/test_zipfile.py (right):

http://bugs.python.org/review/6818/diff/2034/3873#newcode1494
Lib/test/test_zipfile.py:1494: self.assertLess(new_size, size)
On 2011/03/14 01:13:59, loewis wrote:
> This should be stronger: the lengths should have decreased by the compressed
> size+header size+data descriptor size.

Done.

http://bugs.python.org/review/6818/diff/2034/3873#newcode1510
Lib/test/test_zipfile.py:1510: 
On 2011/03/14 01:13:59, loewis wrote:
> There should also be tests that remove a file from the middle, or as the first
> and last file.

Done.

http://bugs.python.org/review/6818/diff/2034/3874
File Lib/zipfile.py (right):

http://bugs.python.org/review/6818/diff/2034/3874#newcode1213
Lib/zipfile.py:1213: zlen = len(zinfo.FileHeader()) + zinfo.compress_size
On 2011/03/14 01:13:59, loewis wrote:
> This needs to take the data descriptor into account, see
> http://www.pkware.com/documents/casestudies/APPNOTE.TXT

Done.

http://bugs.python.org/review/6818/diff/2034/3874#newcode1231
Lib/zipfile.py:1231: del self.NameToInfo[fname]
On 2011/03/14 01:13:59, loewis wrote:
> IIUC, the file pointer is now at the wrong position - namely after the end of
> the original data (including central directory), which means that .close()
will
> write a second central directory. I believe that fp should be positioned after
> the last file.

Done.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7