Issue 15571: Python version of TextIOWrapper ignores "write_through" arg
Issue15571
Created on 2012-08-07 05:27 by ncoghlan, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue-15571-1.patch | chris.jerdonek, 2012-08-07 08:10 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg167603 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2012-08-07 05:27 | |
In discussing #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). |
|||
| msg167606 - (view) | Author: Chris Jerdonek (chris.jerdonek) * ![]() |
Date: 2012-08-07 07:30 | |
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. |
|||
| msg167607 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2012-08-07 07:44 | |
Ah, thanks. Yes, that could definitely use a comment :) |
|||
| msg167608 - (view) | Author: Chris Jerdonek (chris.jerdonek) * ![]() |
Date: 2012-08-07 08:10 | |
Attaching patch. |
|||
| msg168102 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2012-08-13 13:10 | |
New changeset ba055ccd99ef by Andrew Svetlov in branch 'default': Issue #15571: comment the fact what python impl of TextIOWrapper always works in write_throuth mode http://hg.python.org/cpython/rev/ba055ccd99ef |
|||
| msg168104 - (view) | Author: Andrew Svetlov (asvetlov) * ![]() |
Date: 2012-08-13 13:12 | |
Patch applied |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:33 | admin | set | github: 59776 |
| 2017-05-19 15:08:22 | serhiy.storchaka | link | issue29611 superseder |
| 2012-08-13 13:12:25 | asvetlov | set | status: open -> closed nosy:
+ asvetlov resolution: fixed |
| 2012-08-13 13:10:11 | python-dev | set | nosy:
+ python-dev messages: + msg168102 |
| 2012-08-07 08:10:43 | chris.jerdonek | set | files:
+ issue-15571-1.patch keywords: + patch messages: + msg167608 |
| 2012-08-07 07:44:05 | ncoghlan | set | priority: release blocker -> normal type: behavior -> enhancement messages: + msg167607 stage: test needed -> needs patch |
| 2012-08-07 07:30:03 | chris.jerdonek | set | nosy:
+ chris.jerdonek messages: + msg167606 |
| 2012-08-07 05:27:36 | ncoghlan | create | |

