[issue43431] Subprocess timeout causes output to be returned as bytes in text mode

2021-03-08 Thread Jordan Macdonald
Jordan Macdonald added the comment: Eryk Sun: Well, I think step 1 should be to update the documentation for Python 3.7 through 3.10 on `subprocess.run()` and `subprocess.TimeoutExpired` to clearly state that `TimeoutExpired.stdout` and `TimeoutExpired.stderr` will be in bytes format even

[issue43431] Subprocess timeout causes output to be returned as bytes in text mode

2021-03-07 Thread Jordan Macdonald
New submission from Jordan Macdonald : Passing the argument `text=True` to `subprocess.run()` is supposed to mean that any captured output of the called process is automatically decoded and retuned to the user as test instead of bytes. However, if you give a timeout and that timeout expires