Issue16486
Created on 2012-11-16 13:39 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| aifc_context_manager.patch | serhiy.storchaka, 2012-11-16 13:39 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg175687 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2012-11-16 13:39 | |
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. |
|||
| msg178368 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2012-12-28 07:23 | |
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. |
|||
| msg178391 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2012-12-28 16:45 | |
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. |
|||
| msg178535 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2012-12-29 20:55 | |
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 |
|||
| msg178536 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2012-12-29 21:00 | |
I have added the test that the file was actually closed using external file (as in test_close()). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:38 | admin | set | github: 60690 |
| 2013-01-27 02:04:31 | jcea | set | nosy:
+ jcea |
| 2012-12-29 21:00:45 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: + msg178536 stage: patch review -> resolved |
| 2012-12-29 20:55:59 | python-dev | set | nosy:
+ python-dev messages: + msg178535 |
| 2012-12-28 16:45:37 | serhiy.storchaka | set | messages: + msg178391 |
| 2012-12-28 07:23:13 | georg.brandl | set | nosy:
+ georg.brandl messages: + msg178368 |
| 2012-12-27 20:47:43 | serhiy.storchaka | set | assignee: serhiy.storchaka |
| 2012-11-16 13:41:15 | serhiy.storchaka | set | nosy:
+ r.david.murray dependencies: + FD leaks in aifc module stage: patch review |
| 2012-11-16 13:39:23 | serhiy.storchaka | create | |

