New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge StringIO/cStringIO in 3.0 #47167
Comments
PEP-3108 calls for StringIO (which is io.StringIO in 3.0) to have an |
Here's a preliminary patch that add the C optimization for StringIO. So, any idea on what would be the best thing to do? |
Here's another patch fixes the failing tests. I have tried to support @property
def buffer(self):
# XXX Hack to support the buffer attribute.
buf = codecs.getwriter(self.encoding)(BytesIO(), self.errors)
value = self.getvalue()
buf.write(value[:self.tell()])
pos = buf.stream.tell()
buf.write(value[self.tell():])
buf.stream.seek(pos)
return buf.stream but this doesn't work since some application might want to modify the |
I updated the patch to use the new module framework. |
Committed in r64154. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: