cpython: 82fd95c2851b (original) (raw)

Mercurial > cpython

changeset 93259:82fd95c2851b

Issue #22217: Implemented reprs of classes in the zipfile module. [#22217]

Serhiy Storchaka storchaka@gmail.com
date Wed, 29 Oct 2014 22:42:06 +0200
parents 708b2e656c1d
children f4f5b942e5e0
files Lib/test/test_zipfile.py Lib/zipfile.py Misc/NEWS
diffstat 3 files changed, 83 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_zipfile.py 31 Lib/zipfile.py 50 Misc/NEWS 2

line wrap: on

line diff

--- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -326,6 +326,37 @@ class AbstractTestsWithSourceFile: while zipopen.read1(100): pass

+

+ def tearDown(self): unlink(TESTFN) unlink(TESTFN2)

--- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -355,6 +355,28 @@ class ZipInfo (object): # compress_size Size of the compressed file # file_size Size of the uncompressed file

+ def FileHeader(self, zip64=None): """Return the per-file header as a string.""" dt = self.date_time @@ -671,6 +693,20 @@ class ZipExtFile(io.BufferedIOBase): else: self._expected_crc = None

+ def readline(self, limit=-1): """Read and return a line from the stream. @@ -967,6 +1003,20 @@ class ZipFile: def exit(self, type, value, traceback): self.close()

+ def _RealGetContents(self): """Read in the table of contents for the ZIP file.""" fp = self.fp

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -181,6 +181,8 @@ Core and Builtins Library ------- +- Issue #22217: Implemented reprs of classes in the zipfile module. +