Message235947
Posting del-flush.patch, which only calls flush() instead of close() from __del__(), except for the FileIO class. Quick analysis of resulting test failures:
These tests fail because they are obviously written to test that __del__ calls close():
* IOTest.test_IOBase_destructor
* IOTest.test_RawIOBase_destructor
* IOTest.test_BufferedIOBase_destructor
* IOTest.test_TextIOBase_destructor
* test_override_destructor as mentioned above
CBufferedReader/Writer/RandomTest.test_garbage_collection() fail because they do not free the reference to the wrapped raw file object. Similarly, CTextIOWrapperTest.test_garbage_collection() holds references to both levels of wrapped object.
TextIOWrapperTest.test_destructor() fails because it assumes the wrapped close() will be called. The data is still written to the wrapped file though.
MiscIOTest.test_warn_on_dealloc/_fd() fail because the warning message only refers to the FileIO object rather than the wrapper object. |
|
| Date |
User |
Action |
Args |
| 2015-02-14 02:48:40 | martin.panter | set | recipients:
+ martin.panter, pitrou, vstinner, Arfrever, akira, serhiy.storchaka |
| 2015-02-14 02:48:40 | martin.panter | set | messageid: <1423882120.49.0.312425396196.issue19829@psf.upfronthosting.co.za> |
| 2015-02-14 02:48:40 | martin.panter | link | issue19829 messages |
| 2015-02-14 02:48:40 | martin.panter | create | |
|