New submission from Serhiy Storchaka: Proposed patch fixes two related issues in a number of modules.
1. close() methods sometimes release multiple resources. Every closing operation can fail, but it shouldn't prevent releasing other resources. See for example issue21802. 2. close() should be idempotent. I.e. calling close() second times shouldn't have any effect. Even if close() failed, repeated call of close() (usually in __exit__(), in __del__(), or in finally block) shouldn't raise an exception. Many close() methods already satisfy these conditions, but not all. ---------- components: Library (Lib) files: close.patch keywords: patch messages: 240063 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix possible leaks in close methods type: resource usage versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file38829/close.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23865> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com