New submission from Colin Watson <cjwat...@users.sourceforge.net>:

The file-like object returned by TarFile.extractfile can't be wrapped in an 
io.TextIOWrapper (which would be rather convenient in some cases to get 
something that reads str rather than bytes).

The attached patch demonstrates the problem by way of a test case, and fixes 
it.  It's just a matter of adding a no-op flush method so that 
TextIOWrapper.close is happy with it.

----------
components: Library (Lib)
files: tarfile-exfileobject-flush.patch
keywords: patch
messages: 151536
nosy: cjwatson
priority: normal
severity: normal
status: open
title: tarfile.ExFileObject can't be wrapped using io.TextIOWrapper
versions: Python 3.3
Added file: http://bugs.python.org/file24271/tarfile-exfileobject-flush.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13815>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to