Jesús Cea Avión added the comment:
This code was not backported to python 2.7. See Issue #16183
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9846
___
Roundup Robot added the comment:
New changeset 6a14f692df1c by Jesus Cea in branch '2.7':
Closes #16183: ZipExtFile object close without file handle closed (backporting
of Issue #9846)
http://hg.python.org/cpython/rev/6a14f692df1c
--
nosy: +python-dev
Łukasz Langa luk...@langa.pl added the comment:
Adding a patch implementing the discussed functionality, removing almost all of
the ResourceWarnings raised by zipfile.
--
keywords: +patch
nosy: +lukasz.langa
stage: needs patch - patch review
Added file:
Łukasz Langa luk...@langa.pl added the comment:
Committed in rev 86699.
--
resolution: - accepted
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9846
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9846
___
___
Python-bugs-list
Brian Curtin cur...@acm.org added the comment:
A fix to this would help silence a number of ResourceWarning messages coming
out of the test suite.
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9846
New submission from John Admanski jadman...@gmail.com:
When creating a ZipExtFile through ZipFile.open, the if the original ZipFile
object was created with a filename then a new file object will be opened and
given to the ZipExtFile to use for its file operations. There is no explicit
Antoine Pitrou pit...@free.fr added the comment:
Indeed. However, the ZipFile itself knows whether to close the file
(self._filePassed). By adding a constructor argument to ZipExtFile and a
__del__ method, it would solve the issue.
--
nosy: +pitrou
stage: - needs patch
versions:
John Admanski jadman...@gmail.com added the comment:
I'm not sure that's much of an improvement on the existing behavior, though; as
I mentioned you can already work around it by killing all the references to the
ZipExtFile and the underlying file object will get automatically closed if the
R. David Murray rdmur...@bitdance.com added the comment:
Antoine, any reason not to put the close in the ZipFileExt close method instead
of a __del__ method? (And document it, of course).
--
nosy: +r.david.murray
___
Python tracker
10 matches
Mail list logo