[New-bugs-announce] [issue20102] shutil._make_zipfile possible resource leak

Peter Santoro report at bugs.python.org
Wed Jan 1 12:21:17 CET 2014


New submission from Peter Santoro:

Now that zipfile.ZipFile supports the context manager protocol, shouldn't
shutil._make_zipfile make use of it to avoid the possibility of the archive file not being closed properly if an exception occurs?  It should be noted that shutil._unpack_zipfile does use try/finally to ensure that files are closed.

----------
components: Library (Lib)
files: shutil.diff
keywords: patch
messages: 207132
nosy: peter at psantoro.net
priority: normal
severity: normal
status: open
title: shutil._make_zipfile possible resource leak
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file33291/shutil.diff

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


More information about the New-bugs-announce mailing list