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 josiahcarlson
Recipients Andrew.Boettcher, ajaksu2, akira, astrand, cvrebert, ericpruitt, eryksun, giampaolo.rodola, janzert, josiahcarlson, ooooooooo, parameter, r.david.murray, rosslagerwall, sbt, techtonik, v+python
Date 2014-04-14.21:50:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397512237.12.0.592856496417.issue1191964@psf.upfronthosting.co.za>
In-reply-to
Content
I ended up eliminating the overlapped IO cancel call on Windows. Better to be correct than to minimize internal state. Instead, we keep a reference to the overlapped IO object, and any attempts to write to the child stdin before the previous overlapped IO completes are kicked back as a 0 byte write. The communicate() method does the right thing with pre-existing non-blocking writes, whether input is passed or not.

I also eliminated universal_newline support for non-blocking reads and writes to prevent error conditions on edge cases:

On the write side of things, you could end up with a partial multi-byte character write, which with universal newlines, would be impossible to finish the send using the public API without first modifying state attributes on the Popen object (disabling universal newlines for a subsequent bytes write_nonblocking() call).

On the read side of things, if you get a partial read of a multi-byte character, then the subsequent decode operation would fail with a UnicodeDecodeError. Though you could pull the original bytes from the exception, that's an awful API to create.
History
Date User Action Args
2014-04-14 21:50:38josiahcarlsonsetrecipients: + josiahcarlson, astrand, parameter, techtonik, giampaolo.rodola, ajaksu2, ooooooooo, v+python, r.david.murray, cvrebert, ericpruitt, akira, Andrew.Boettcher, rosslagerwall, sbt, janzert, eryksun
2014-04-14 21:50:37josiahcarlsonsetmessageid: <1397512237.12.0.592856496417.issue1191964@psf.upfronthosting.co.za>
2014-04-14 21:50:37josiahcarlsonlinkissue1191964 messages
2014-04-14 21:50:36josiahcarlsoncreate