You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
assignee=Noneclosed_at=Nonecreated_at=<Date2014-05-11.11:25:06.568>labels= ['type-bug', 'library']
title='subprocess line-buffering only works in universal newlines mode'updated_at=<Date2014-05-11.12:20:06.750>user='https://github.com/pitrou'
The docs for subprocess.Popen seem to imply that line-buffering is always available. However, bufsize=1 is a special value only when open the pipes in text mode, i.e. when "universal newlines" are enabled.
In the short term, we should probably fix the subprocess docs.
In the long term, perhaps we can add a line buffering capability to BufferedWriter?
Ha, it seems actually worse than that, since no buffering argument is ever passed to the TextIOWrapper constructor. "bufsize=1" will simply get ignored, and line buffering doesn't work at all.
Until the current patch for issue bpo-21332 is committed; bufsize=1 is
equivalent to bufsize=-1 in both binary and text mode.
You are correct the patch in bpo-21332 fixes only the text mode
(universal_newlines=True) -- it also updates the documentation
to mention that bufsize=1 works only in text mode.
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: