[issue41222] Undocumented behaviour change of POpen.stdout.readine with bufsize=0 or =1

2021-05-03 Thread Yann Dirson
Change by Yann Dirson : -- keywords: +patch pull_requests: +24542 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25859 ___ Python tracker ___

[issue41222] Undocumented behaviour change of POpen.stdout.readine with bufsize=0 or =1

2021-05-03 Thread Yann Dirson
Yann Dirson added the comment: Relevant commits include this one from v3.1.4: commit 877766dee8e60c7971ed0cabba89fbe981c2ab1b Author: Antoine Pitrou Date: Sat Mar 19 17:00:37 2011 +0100 Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really creates unbuffered pipes,

[issue41222] Undocumented behaviour change of POpen.stdout.readine with bufsize=0 or =1

2021-05-02 Thread Yann Dirson
Yann Dirson added the comment: With upcoming 3.10 phasing out 2.7 compatibility I have to find a solution to this, so I'm back digging here. Even .read(1) on a subprocess pipe causes an underlying buffered read, so working around the problem by a loop of 1-byte reads has to do with

[issue41222] Undocumented behaviour change of POpen.stdout.readine with bufsize=0 or =1

2020-07-06 Thread Yann Dirson
New submission from Yann Dirson : On a POpen object created with bufsize=0, stdout.readline() does a buffered reading with python3, whereas in 2.7 it did char-by-char reading. See attached example. As a result, a poll including the stdout object suffers a behaviour change when stdout is