[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker ___ ___

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2a06379f6562 by Serhiy Storchaka in branch '3.4': Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h. https://hg.python.org/cpython/rev/2a06379f6562 New changeset 5b70eb1cfad0 by Serhiy Storchaka in branch 'default': Issue #23421: Fi

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread 許邱翔
許邱翔 added the comment: s/factored/refactored/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread 許邱翔
許邱翔 added the comment: Attached factored patch for tests. It looks much better. :) -- hgrepos: +299 Added file: http://bugs.python.org/file38079/add_tarfile_cli_filetype_test_refactor.patch ___ Python tracker ___

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general LGTM, but I have added few nitpicks on Rietveld. -- ___ Python tracker ___ ___ Python-b

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread 許邱翔
許邱翔 added the comment: Here is the tests. -- hgrepos: +298 Added file: http://bugs.python.org/file38059/add_tarfile_cli_filetype_test.patch ___ Python tracker ___ ___

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread 許邱翔
許邱翔 added the comment: Oh, I can use it. thx -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread Serhiy Storchaka
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 an

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread 許邱翔
Changes by 許邱翔 : -- versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread 許邱翔
許邱翔 added the comment: yes just wanna know is there a standard way to get file type by libmagic ? -- versions: -Python 3.4 ___ Python tracker ___ __

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patch. Could you provide tests? -- nosy: +berker.peksag, serhiy.storchaka stage: -> test needed versions: +Python 3.4 ___ Python tracker _

[issue23421] tarfile module does not correctly choose compression algorithms

2015-02-09 Thread wdv4758h
New submission from wdv4758h: The command "python -m tarfile -c test.tar.bz2 test/" should create a file that is compressed by bzip2, but actually the detection of compression algorithm that should be used is broken (for gz, xz, bz2). fix it by prepending a dot to the keys of the dictionary -