Martin Panter added the comment:

For the record, the difference between Python 2 and 3 is probably a side effect 
of revision 050f0f7be11e. Python 2 copies data from the ExFileObject returned 
by extractfile(), while Python 3 copies directly from the underlying file.

The patches to the file reading class look good.

I would be a bit hesitant about the bit that reads all the file data in the 
next() method. I guess if someone had an uncompressed tar file with only a 
couple of large files, and they just wanted to list the file names or extract a 
small file at the end, reading all the data would have a significant impact. 
Perhaps there is a way to seek almost to the end, and then just read one byte 
or something.

Also, beware that according to the documentation, os.truncate() only supports 
Windows in 3.5+, so you might have to adjust the test if applying this to 3.4.

----------

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

Reply via email to