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
Python version of TextIOWrapper ignores "write_through" arg #59776
Comments
In discussing bpo-15216, I noticed that the write_through parameter is completely unused in the Python implementation of TextIOWrapper. That also means we have a hole in the test coverage: there is no test that is run on both the C and Python versions to ensure that the data is being written directly through to the underlying buffer (e.g. by passing in a mock buffer object). |
The fact that the Python implementation doesn't look at write_through doesn't necessarily mean that it's not respected. It could always write through. Indeed, it looks like this is the case and was discussed at one point: http://bugs.python.org/issue12591#msg141006 Also, it appears that there is a test in both cases (the test class is subclassed twice), though I could be wrong: http://hg.python.org/cpython/file/0eeffeadaa1e/Lib/test/test_io.py#l2453 In any case, this could probably at least use a code comment. |
Ah, thanks. Yes, that could definitely use a comment :) |
Attaching patch. |
New changeset ba055ccd99ef by Andrew Svetlov in branch 'default': |
Patch applied |
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: