[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2012-11-03 Thread Roundup Robot
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 __

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2012-11-03 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: This code was not backported to python 2.7. See Issue #16183 -- nosy: +jcea ___ Python tracker ___ _

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-11-22 Thread Łukasz Langa
Łukasz Langa added the comment: Committed in rev 86699. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-11-22 Thread Łukasz Langa
Łukasz Langa 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: http://bugs.python.org/file19778/issue9846.diff

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-11-02 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-10-31 Thread Brian Curtin
Brian Curtin 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 ___

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-09-14 Thread Antoine Pitrou
Antoine Pitrou 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). You are right, a close() method would be enough. Furthermore, ZipExtFile already supports the context manager protocol (imp

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-09-13 Thread R. David Murray
R. David Murray 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 __

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-09-13 Thread John Admanski
John Admanski 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 ZipExtFile is the onl

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-09-13 Thread Antoine Pitrou
Antoine Pitrou 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: +Python 3.2 -Pytho

[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-09-13 Thread John Admanski
New submission from John Admanski : 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 mechanism that will allow y