classification
Title: Add Python implementation of the tar utility
Type: enhancement Stage: test needed
Components: Demos and Tools Versions: Python 3.5
process
Status: open Resolution:
Dependencies: 21549 Superseder:
Assigned To: Nosy List: Claudiu.Popa, berker.peksag, eric.araujo, lars.gustaebel, serhiy.storchaka
Priority: normal Keywords:

Created on 2014-05-21 10:49 by serhiy.storchaka, last changed 2020-03-18 18:07 by brett.cannon.

Files
File name Uploaded Description Edit
tar.py serhiy.storchaka, 2014-05-21 10:49
Messages (4)
msg218867 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-05-21 10:49
Here is preliminary Python implementation of the tar archiving utility. I propose to add it to Tools/script. The main purpose of this the research of which features needed the tarfile module. Another purpose is that this provides more powerful tool to create or extract tar archives on platforms where the tar utility is not installed (the tarfile module itself provides very simple command line interface).

Supported options are mainly common subset of GNU tar and bsdtar options. Some options (--absolute-names, controlling of symlinks and hardlings dereferencing and files overwriting) needs implementing new features in the tarfile module.
msg218870 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-05-21 11:42
I don't think that adding it to Tools/script helps that much on Windows at least. See issue21027 for reference. Except this, +1 from me.
msg218874 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-05-21 13:54
If this goes in then the CLI in the tarfile module should be removed.
msg219052 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-05-24 20:03
IIRC, when the tarfile module CLI was added, there was a decision to keep it short and simple, not mimic the whole tar(1) interface.

Python core ships with modules that should be featurefull, but we don’t put much focus or effort on general utilities: the only globally installed scripts are directly useful to Python devs (idle, pydoc, pyvenv, 2to3); the stdlib modules with a CLI are quick helpers (python -m SimpleHTTPServer) or smoke tests or demos IIRC; Tools/scripts have an even lower level of usefulness and maintenance.

I sympathize with the use case of finding missing pieces in tarfile, but I’m wary about the maintenance burden (code maintenance if it matches tar(1) fully, support if it does not, endless discussions about installing it on Windows like what happened for Tools/scripts/diff.py, etc).
History
Date User Action Args
2020-03-18 18:07:04brett.cannonsetnosy: - brett.cannon
2014-05-24 20:03:48eric.araujosetnosy: + eric.araujo
messages: + msg219052
2014-05-21 13:54:19brett.cannonsetnosy: + brett.cannon
messages: + msg218874
2014-05-21 11:42:43Claudiu.Popasetnosy: + Claudiu.Popa
messages: + msg218870
2014-05-21 10:50:09serhiy.storchakasetdependencies: + Add the members parameter for TarFile.list()
2014-05-21 10:49:14serhiy.storchakacreate