[Python-3000] Remove TarFileCompat from tarfile.py

Lars Gustäbel lars at gustaebel.de
Mon Jul 21 16:32:09 CEST 2008


Hi!

I just had a look at issue 3039 that reports a bug in tarfile.py's
TarFileCompat class and I came to the conclusion that I really would like to
remove the TarFileCompat class from Python 3.0.

Some details: The ZipFile and TarFile classes both have very different
interfaces. The original intention behind TarFileCompat was to have a second
TarFile class with a ZipFile-like interface, so that both could be used in the
same context.

In retrospect, the addition of TarFileCompat has never been a good idea. There
are few use cases and I think only a few people actually know that it exists.
The class is small and has little functionality which can be accomplished
easily without it. It has to be synchronized with ZipFile whenever that
changes. It has no unittests, so that the TarFile.writestr() method has been
broken for over two years without anyone noticing. Recently, TarFile's
extract() and extractall() methods were added to ZipFile's interface.

I know that this is a minor issue, but I don't want to remove TarFileCompat
without having asked for opinions before (if there are any).

Thanks.

-- 
Lars Gustäbel
lars at gustaebel.de

War does not determine who is right - only who is left.
(Bertrand Russell)


More information about the Python-3000 mailing list