This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, giampaolo.rodola, macdjord
Date 2021-03-08.12:58:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615208286.15.0.324104399783.issue43431@roundup.psfhosted.org>
In-reply-to
Content
communicate() is incomplete, so decoding the output may fail. For example, say the encoding is UTF-8, and the last multibyte character sequence (2-4 bytes) is incomplete. Maybe communicate() should always set `stdout_bytes` and `stderr_bytes` attributes on the timeout exception, and, in text mode, try to decode the output as `stdout` and/or `stderr`. If decoding fails, set the decoded value to None.

In Windows, run() tries to complete communication, which is dysfunctional in cases. I created bpo-43346 to propose changing the design in Windows, in order to address 3 cases that can cause subprocess.run() to ignore the given timeout. The proposed change also sets an incomplete read of stdout and stderr as bytes objects, regardless of text mode, because I was simply matching what POSIX does in this case.
History
Date User Action Args
2021-03-08 12:58:06eryksunsetrecipients: + eryksun, giampaolo.rodola, macdjord
2021-03-08 12:58:06eryksunsetmessageid: <1615208286.15.0.324104399783.issue43431@roundup.psfhosted.org>
2021-03-08 12:58:06eryksunlinkissue43431 messages
2021-03-08 12:58:05eryksuncreate