This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Arfrever, akira, martin.panter, pitrou, serhiy.storchaka, vstinner
Date 2015-02-14.02:48:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423882120.49.0.312425396196.issue19829@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-02-14 02:48:40martin.pantersetrecipients: + martin.panter, pitrou, vstinner, Arfrever, akira, serhiy.storchaka
2015-02-14 02:48:40martin.pantersetmessageid: <1423882120.49.0.312425396196.issue19829@psf.upfronthosting.co.za>
2015-02-14 02:48:40martin.panterlinkissue19829 messages
2015-02-14 02:48:40martin.pantercreate