[issue23421] tarfile module does not correctly choose compression algorithms

Serhiy Storchaka report at bugs.python.org
Mon Feb 9 15:06:06 CET 2015


Serhiy Storchaka added the comment:

No need to use libmagic. tarfile.TarFile.gzopen() should fail if the file is not gzipped tar file. There CLI tests in Lib/test/test_tarfile.py. New test should create tar file with file name that ends with the '.gz' extension and check that it can be open and read with gzopen().

----------

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


More information about the Python-bugs-list mailing list