[issue16486] Add context manager support to aifc module
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16486] Add context manager support to aifc module
Roundup Robot added the comment: New changeset 9beb11071dd1 by Serhiy Storchaka in branch 'default': Issue #16486: Make aifc files work with 'with' as context managers. http://hg.python.org/cpython/rev/9beb11071dd1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16486] Add context manager support to aifc module
Serhiy Storchaka added the comment: I have added the test that the file was actually closed using external file (as in test_close()). -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16486] Add context manager support to aifc module
Serhiy Storchaka added the comment: fout.close() here is intentional no-op. This is a check that fout was closed properly (in contrary case close() should raise exception). Unfortunately there is no other way to test that fout was closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16486] Add context manager support to aifc module
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16486] Add context manager support to aifc module
Georg Brandl added the comment: The self.fout.close() is not needed here I think. Another thing the test should test is that the file was actually closed on exception. Otherwise, LGTM. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16486] Add context manager support to aifc module
New submission from Serhiy Storchaka: The proposed patch adds context manager support aifc module. Now objects returned by aifc.open() will support context manager protocol. This issue required first fixing issue16485 to pass tests. -- components: Library (Lib) files: aifc_context_manager.patch keywords: patch messages: 175687 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Add context manager support to aifc module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28001/aifc_context_manager.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16486] Add context manager support to aifc module
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +FD leaks in aifc module nosy: +r.david.murray stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com