[issue2918] Merge StringIO/cStringIO in 3.0
Alexandre Vassalotti
report at bugs.python.org
Tue Jun 10 04:14:11 CEST 2008
Alexandre Vassalotti <alexandre at peadrop.com> added the comment:
Here's a preliminary patch that add the C optimization for StringIO.
All tests are passing except two which depends on the StringIO.buffer
attribute of the TextIOWrapper class. Honestly, I am not sure what is
the correct way to fix this. I cannot simply "fake" the attribute by
returning a BytesIO object, since the file position of buffer is
undecidable. It seems to me that the only way to fix these failing tests
would be to define a FakeIO class, in their test file, that would wrap
ByteIO with TextIOWrapper, just like the old and inefficient StringIO.
So, any idea on what would be the best thing to do?
----------
keywords: +patch
Added file: http://bugs.python.org/file10568/add-stringio-1.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2918>
_______________________________________
More information about the Python-bugs-list
mailing list