[issue15841] Some StringIO and BytesIO methods can succeed after close

Alessandro Moura report at bugs.python.org
Sun Sep 2 12:08:20 CEST 2012


Alessandro Moura added the comment:

This also happens for the writable() and seekable() methods. The problem is that those methods do not check whether the buffers have been closed in stringio.c. This is fixed in the attached patch for StringIO. BytesIO should be the same, but bytesio.c is structured differently, and I still have to understand the code. I will try to do this, and then add tests for this issue - which should go in one of the mixins of test_memoryio.py, I presume.

----------
keywords: +patch
nosy: +eng793
Added file: http://bugs.python.org/file27094/stringio.c.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15841>
_______________________________________


More information about the Python-bugs-list mailing list