[New-bugs-announce] [issue14061] Clean up archiving code in shutil

Éric Araujo report at bugs.python.org
Mon Feb 20 03:31:07 CET 2012


New submission from Éric Araujo <merwok at netwok.org>:

shutil.make_archive suffers from these issues:

- It always supports the 'zip' and 'gztar' formats but if Python is built without zlib then they won’t work.  Even if this is probably rare, the code should be robust.  Likewise, the tests detect the availability of bz2 but not zlib/gzip.

- If zipfile is not found, it tries to call a zip program.  I think this approach (inherited from distutils, which did that before zipfile and tarfile were in the stdlib) should be dropped.  I don’t like shutil using distutils.spawn, I don’t like a Python module calling an external program, and I think nearly everyone has a Python compiled with zlib now.

I want to work on a patch to fix this.  The first point would not change the behavior for most users, it would only modify the list of formats ”guaranteed” by the docs, so I think it’s okay for stable branches; the second point is probably inappropriate for stable branches.

----------
components: Library (Lib)
messages: 153760
nosy: eric.araujo, georg.brandl, nadeem.vawda, tarek
priority: normal
severity: normal
status: open
title: Clean up archiving code in shutil
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14061>
_______________________________________


More information about the New-bugs-announce mailing list