[issue14061] Clean up archiving code in shutil

2012-02-24 Thread Nadeem Vawda
Nadeem Vawda added the comment: I don't think there's any harm in testing that the exception message for a .bz2 file contains the string "unknown archive format". It's unlikely that we'll want to completely change the error message in future, and if we do, it will be pretty easy and obvious to f

[issue14061] Clean up archiving code in shutil

2012-02-23 Thread Éric Araujo
Éric Araujo added the comment: I intend to commit this simple fix for all branches: -_UNPACK_FORMATS['bztar'] = (['.bz2'], _unpack_tarfile, [], +_UNPACK_FORMATS['bztar'] = (['.tar.bz2'], _unpack_tarfile, [], I could write a unit test, but it would be coupled to the exact text of the e

[issue14061] Clean up archiving code in shutil

2012-02-22 Thread Éric Araujo
Éric Araujo added the comment: Another bug: the bztar unpacker will be called for files ending in '.bz2', but it should really check for '.tar.bz2' (just like the gztar unpacker is called for '.tar.gz' or '.tgz'). -- ___ Python tracker

[issue14061] Clean up archiving code in shutil

2012-02-19 Thread Éric Araujo
New submission from Éric Araujo : shutil.make_archive suffers from these issues: - It always supports the 'zip' and 'gztar' formats but if Python is built without zlib then they won’t work. Even if this is probably rare, the code should be robust. Likewise, the tests detect the availability