cpython: ab6496b98ac4 (original) (raw)

Mercurial > cpython

changeset 76918:ab6496b98ac4

Issue #13815: Resurrect the ExFileObject class. After a discussion in the tracker, the decision was made to keep the ExFileObject class after all as a subclass of io.BufferedReader instead of removing it completely. [#13815]

Lars Gustäbel lars@gustaebel.de
date Mon, 14 May 2012 13🔞16 +0200
parents 8a8120ee1202
children 1338b6fece2d
files Lib/tarfile.py Misc/NEWS
diffstat 2 files changed, 11 insertions(+), 10 deletions(-)[+] [-] Lib/tarfile.py 17 Misc/NEWS 4

line wrap: on

line diff

--- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -758,6 +758,13 @@ class _FileInFile(object): self.closed = True #class _FileInFile +class ExFileObject(io.BufferedReader): +

+#class ExFileObject #------------------

Exported Classes

@@ -1443,8 +1450,7 @@ class TarFile(object): tarinfo = TarInfo # The default TarInfo class to use.

def init(self, name=None, mode="r", fileobj=None, format=None, tarinfo=None, dereference=None, ignore_zeros=None, encoding=None, @@ -2081,12 +2087,7 @@ class TarFile(object): if tarinfo.isreg() or tarinfo.type not in SUPPORTED_TYPES: # Members with unknown types are treated as regular files.

elif tarinfo.islnk() or tarinfo.issym(): if isinstance(self.fileobj, _Stream):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -26,6 +26,8 @@ Core and Builtins Library ------- +- Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects. +