[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Serhiy Storchaka, go for it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, this is not a duplicate. ZipExtFile.close() closes a file handle, but ZipExtFile.close() is not used here. I see also some possible FD leaks in ZipFile.open(). It will be good to fix all them in this issue. If no one will make a patch for this easy i

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I think this is a duplicate of issue #16183. Are you sure python 3 is affected?. -- nosy: +jcea ___ Python tracker ___

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Quite the contrary. The ZipExtFile closes the file descriptor if the ZipFile is constructed on a filename. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Eric Busboom
Eric Busboom added the comment: I've tried just closing the ZipExtFile created in testzip, but that didn't actually close the file. It looks like ZipExtClose.close() also doesn't close the file descriptor, at least when the ZipFile is constructed on a filename. This code worked (Addition of f.

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch type: behavior -> resource usage versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Eric Busboom
New submission from Eric Busboom: The zipfile.testzip() method will open each of the files in a zip archive, but does not close the files, resulting in a file descriptor leak. -- components: Library (Lib) messages: 174829 nosy: Eric.Busboom priority: normal severity: normal status: open