gh-85393: Handle partial and blocking .write in TextIOWrapper#134467
gh-85393: Handle partial and blocking .write in TextIOWrapper#134467cmaloney wants to merge 8 commits into
Conversation
Also improves non-blocking support (pythongh-57531) and unbuffered support (pythongh-61606)
696abe7 to
4173474
Compare
|
I'm at the PyConUS sprints, would appreciate a high-level review / if the approach I took here looks like what you expect. In particular I tried to keep behavior around all the unexpected potential return values from cc: @vstinner, @serhiy-storchaka (commented on the underlying issue, but also was quite a while ago. If there's better experts or someone more appropriate let me know) |
|
As I'm working on BufferedIO seeing a lot of cases where the buffering logic I'm testing moving towards there is very similar to what TextIOWrapper is doing internally, and hope I may be able to reduce a bit between the two (and allow utf-8 containing/encoded unicode objects to be buffered without a memcpy to make a temporary bytes object). I think that'll be a lot simpler than this, although may revisit depending on timelines. |
Also improves non-blocking support (gh-57531) and unbuffered support (gh-61606)
While behavior doesn't (generally) change it adds a lot of new warnings so I feel this is more of a feature (support non-blocking and unbuffered!) than a bugfix.
TODO before non-Draft