This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Ankur.Ankan, berker.peksag, brandon-rhodes, eric.araujo, ezio.melotti, kyle, larry, lars.gustaebel, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2013-11-23.12:54:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think Berker has misunderstood me. Here is a patch based on issue13477_v5.diff with some cherry-picked changes from issue13477_v6.diff and several other changes:

* --create, --extract, --list, and --test options are now mutual exclusive.
* --test now test a tarfile for integrity (as in the zipfile module).
* File names in output are printed now with repr().
* Now tarfile CLI now is silent by default. Added option -v (--verbose) to print more verbose output as in issue13477_v5.diff.
* Added helps for arguments.
* Fixed and enhanced tests,

I'm going to commit this patch at short time.

Known bugs:

* Help for --extract shows "--extract <tarfile> [<output_dir> ...]" instead of "--extract <tarfile> [<output_dir>]". --extract accepts only 1 to 2 arguments.
* --list fails with a tarfile containing unencodable file names. In particular it fails with test tarfiles in the test suite.
* Possible problems with unusual locales and file system encodings.
* Corrupted tarfiles produces tracebacks.
* Tests for --create should check that created tarfile contains correct files.
* Tests for --create should check that correct files are extracted.
* Needed tests for non-ASCII file names.

Besides all this I think the patch can be committed.
Date User Action Args
2013-11-23 12:54:41serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, lars.gustaebel, pitrou, vstinner, larry, ezio.melotti, eric.araujo, kyle, brandon-rhodes, berker.peksag, Ankur.Ankan
2013-11-23 12:54:40serhiy.storchakasetmessageid: <>
2013-11-23 12:54:40serhiy.storchakalinkissue13477 messages
2013-11-23 12:54:39serhiy.storchakacreate