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.

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

Created on 2014-05-21 10:49 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit serhiy.storchaka, 2014-05-21 10:49
Messages (5)
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/, etc).
msg394745 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-05-30 00:02
Given the addition of the tarfile CLI and the seeming lack of interest, can this be closed?
Date User Action Args
2022-04-11 14:58:03adminsetgithub: 65749
2021-05-30 11:45:10serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: test needed -> resolved
2021-05-30 00:02:25FFY00setnosy: + FFY00
messages: + msg394745
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