Changes by Antoine Pitrou pit...@free.fr:
--
assignee: lars.gustaebel -
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
Roundup Robot added the comment:
New changeset 5b52db6fc7dc by R David Murray in branch 'default':
whatsnew: tarfile cli (#13477).
http://hg.python.org/cpython/rev/5b52db6fc7dc
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
changeset: 87476:a539c85aec51
user:Antoine Pitrou solip...@pitrou.net
date:Sun Nov 24 01:55:05 2013 +0100
summary:
Try to fix test_tarfile under Windows
Thank you Antoine.
--
___
Python
Serhiy Storchaka added the comment:
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
Roundup Robot added the comment:
New changeset a5b6c8cbc473 by Serhiy Storchaka in branch 'default':
Issue #13477: Added command line interface to the tarfile module.
http://hg.python.org/cpython/rev/a5b6c8cbc473
--
nosy: +python-dev
___
Python
Roundup Robot added the comment:
New changeset 70b9d22b900a by Serhiy Storchaka in branch 'default':
Build a list of supported test tarfiles dynamically for CLI test command
http://hg.python.org/cpython/rev/70b9d22b900a
--
___
Python tracker
Berker Peksag added the comment:
Attached an updated patch that addresses Serhiy's comments. Thanks!
--
Added file: http://bugs.python.org/file32725/issue13477_v6.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
Serhiy Storchaka added the comment:
I have added comments on Rietveld.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
keywords: +needs review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Antoine Pitrou added the comment:
From a quick glance, the patch looks ok. Serhiy, do you want to review it any
further?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Serhiy Storchaka added the comment:
Yes, this is in my plans.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Python-bugs-list
Berker Peksag added the comment:
Thanks for the rebase, Antoine.
Here is an updated patch:
- Adressed Serhiy's comments. I didn't add a directory parameter to the
create command to keep the CLI simple.
- Added a test for dotless files
- Returned proper exit codes
--
components:
Antoine Pitrou added the comment:
Regenerated patch against latest default (fixing conflicts).
--
nosy: +pitrou
stage: needs patch - patch review
Added file: http://bugs.python.org/file31305/tarcli.patch
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Then I propose to add an alternative tarfile command-line interface as
Tools/scripts/tar.py for those who prefer a well-known and well-tested
traditional interface.
--
___
Python tracker rep...@bugs.python.org
Changes by Berker Peksag berker.pek...@gmail.com:
Added file: http://bugs.python.org/file29686/issue13477_v4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Changes by Berker Peksag berker.pek...@gmail.com:
Removed file: http://bugs.python.org/file29311/issue13477_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
STINNER Victor added the comment:
I don't think that we need to support compressing/decompressing using
the standard input/output.
2013/3/20 Brandon Craig Rhodes rep...@bugs.python.org:
Brandon Craig Rhodes added the comment:
Larry Hastings rep...@bugs.python.org writes:
Huh. tar *can*
Lars Gustäbel added the comment:
I'd like to re-emphasize that it is best to keep the whole thing as simple and
straight-forward as possible. Offer some basic operations and that's it.
Although I am pretty accustomed to the original tar command line, I think we
should copy zipfile's
Larry Hastings added the comment:
Modern tar programs don't need to be told the compression method--they infer
it. If they can do it in C, we can do it in Python. So we should simply omit
the -bz2 stuff.
As for what the interface should look like, I'm definitely in favor of it
looking like
Serhiy Storchaka added the comment:
Note that --create command should support --directory option too.
Modern tar programs don't need to be told the compression method--they infer
it. If they can do it in C, we can do it in Python. So we should simply
omit the -bz2 stuff.
An archive may
Larry Hastings added the comment:
Huh. tar *can* infer it from the data itself. On the other hand, it chooses
explicitly not to.
% cat ~/Downloads/Python-3.3.0.tar.bz2| tar xvf -
tar: Archive is compressed. Use -j option
tar: Error is not recoverable: exiting now
% cat
Brandon Craig Rhodes added the comment:
Larry Hastings rep...@bugs.python.org writes:
Huh. tar *can* infer it from the data itself. On the other hand, it
chooses explicitly not to. I guess tar knows explicit is better
than implicit too ;-)
I am told that the refusal of tar to introspect
Éric Araujo added the comment:
Users of the TAR format usually come from UNIX,
so using the same command line options should not be so surprising.
Not sure about that: they could be Python users wanting to unpack a tarball
sdist. That said, there is no harm in being compatible, and I like
Éric Araujo added the comment:
Did you get all the review comments? Some of them were made on older versions
of the patch, and don’t seem to be addressed in the latest version. Thanks.
Ankur, could you submit a contributor agreement?
http://www.python.org/psf/contrib/contrib-form/
Ankur Ankan added the comment:
I am still unclear about the outcomes of the discussion. I am confused which
features need to be kept and which are to be removed.
Ankur, could you submit a contributor agreement?
I will submit it today.
--
___
Ankur Ankan added the comment:
Thanks for your comments Serhiy.
I have improved the patch according to your comments. Please have a look.
And I am writing tests.
--
Added file: http://bugs.python.org/file29337/issue_13477_v2
___
Python tracker
Serhiy Storchaka added the comment:
It will be good if Berker and Ankur will merge their patches. Ankur's patch has
some very useful features, but Berker's patch looks more mature.
I prefer to emulate a subset of the tar utility interface too.
--
Éric Araujo added the comment:
I am more in favor of having something simple and similar to zipfile, like
Lars, rather than following tar.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
Serhiy Storchaka added the comment:
This can confuse users. Note that even jar (which works with zip-like files)
honors tar interface.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
Éric Araujo added the comment:
Yeah, that’s always the discussion when writing a Python utility that has a
unix equivalent: do you want to be familiar to Python users or to the unix tool
users?
I don’t have a strong opinion. I think unix users would have no reason to use
python -m tarfile,
STINNER Victor added the comment:
+parser.add_argument('--gz', '--gunzip', '--gzip', '--tgz', '-z',
+'--ungzip', action = 'store_true',
+help = 'gz compression')
+parser.add_argument('--bz2', '--bzip2', '--tbz2', '--tbz', '--tb2',
+
Berker Peksag added the comment:
New patch(issue13477_v3.diff) attached.
Changes:
* Addressed comments from Serhiy
* Added output parameter to --extract option (from Ankur's patch)
* Updated tests and documentation
The current docstring of tarfile module does not give much
information(it just
Changes by Berker Peksag berker.pek...@gmail.com:
Removed file: http://bugs.python.org/file29291/issue13477.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Changes by Berker Peksag berker.pek...@gmail.com:
Removed file: http://bugs.python.org/file29346/issue13477_v3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Changes by Berker Peksag berker.pek...@gmail.com:
Added file: http://bugs.python.org/file29347/issue13477_v3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Ankur Ankan added the comment:
+parser.add_argument('--gz', '--gunzip', '--gzip', '--tgz', '-z',
+'--ungzip', action = 'store_true',
+help = 'gz compression')
+parser.add_argument('--bz2', '--bzip2', '--tbz2', '--tbz', '-- tb2',
+
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Berker Peksag added the comment:
Patch looks good! Some minor comments on Rietveld.
Thanks for the review, Éric.
Could you add tests?
Done.
Here's the new patch with Éric's comments addressed.
--
Added file: http://bugs.python.org/file29311/issue13477_v2.diff
Changes by Berker Peksag berker.pek...@gmail.com:
--
keywords: +patch
nosy: +berker.peksag
Added file: http://bugs.python.org/file29291/issue13477.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
Éric Araujo added the comment:
Patch looks good! Some minor comments on Rietveld.
Could you add tests?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Raymond Hettinger added the comment:
+1 for adding a CLI and +1 for keeping it minimal.
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Ankur Ankan added the comment:
I was also working on this issue so thought I should also submit my patch.
Has a few extra features from berker.peksag's patch:
1) the name of the files to be extracted can be specified
2) output directory can be specified for extracting files.
--
Added
Changes by Ankur Ankan ankuran...@gmail.com:
--
nosy: +Ankur.Ankan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Python-bugs-list
Changes by Berker Peksag berker.pek...@gmail.com:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Changes by Kyle Shannon k...@pobox.com:
--
nosy: +kyle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Python-bugs-list mailing list
Lars Gustäbel l...@gustaebel.de added the comment:
This is no bad idea. I recommend keeping it as simple as possible. I would
definitely not be supportive of a full tar clone. List, extract, create - that
should be enough. There are two possible command line choices: do what the
zipfile
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
___
Python-bugs-list
New submission from Brandon Craig Rhodes bran...@rhodesmill.org:
The tarfile module should have a simple command line that allows it to be
executed with -m — even if its only ability was to take a filename and
extract it to the current directory, it could be a lifesaver on Windows
machines
Ezio Melotti ezio.melo...@gmail.com added the comment:
The feature request seems reasonable to me, but this can only go in 3.3.
If you want to propose a patch, you might want to check the devguide and what
other modules like zipfile do.
--
nosy: +ezio.melotti, lars.gustaebel
stage: -
49 matches
Mail list logo