[issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers()

David Nesting report at bugs.python.org
Wed Nov 17 17:03:16 CET 2010


David Nesting <david at fastolfe.net> added the comment:

Thanks, Lars.  And this does make complete sense to me in retrospect.

Better documentation here would help a lot.  I'm happy to take a stab at this.  Short of labeling methods as "safe for streaming" versus "unsafe for streaming", it occurs to me that it would be a lot cleaner if TarFile were actually broken up into two classes: one streaming-safe, and the other layering random access convenience methods on top of that.  For compatibility's sake the open method should probably still return an instance of the composite class, but at least it keeps these logically separate internally and makes it easier to document.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10436>
_______________________________________


More information about the Python-bugs-list mailing list