Éric Araujo <mer...@netwok.org> added the comment:

> I think we can restructure the code a bit to reduce the work involved in 
> adding a new format, though.
> Maybe something like this: [snip]
Thanks, I’ve applied your obvious refactor in my clone :)  For clarity, I will 
split my patch into many patches for different reports (bug fixes and doc 
improvements for 3.2, then code cleanup in 3.3, then adding xz).

> By the way, is there any reason why you've used ".gz" instead of ".tar.gz" as 
> the extension for "gztar"
> in your proposed change? The current version of shutil.py uses ".tar.gz", but 
> has ".bz2" for "bztar".
Yes, I confused the two formats.  I reported the '.bz2' bug (should be 
'.tar.bz2') and will fix it.

> Also, I notice that _make_tarball() will need to be updated to add the info 
> for xz to the tar_compression
> and compress_ext dictionaries.
I ripped them off.  I could have pasted my full patch to save you time, sorry!

> For the "xztar" format, you should also perhaps recognize the ".txz" extension
Done.  Google finds a number of matches.  I won’t add '.tbz' though, as I don’t 
know if it’s bzip or bzip2, and as it does not seem used much.

----------
dependencies:  -tarfile should expose supported formats

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

Reply via email to