New submission from Éric Araujo <mer...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue14061>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to