Author josiahcarlson
Recipients Andrew.Boettcher, ajaksu2, akira, astrand, cvrebert, ericpruitt, eryksun, giampaolo.rodola, gvanrossum, janzert, josiahcarlson, martin.panter, ooooooooo, parameter, r.david.murray, rosslagerwall, sbt, techtonik, v+python, vstinner, yselivanov
Date 2014-06-02.18:47:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401734829.14.0.540864752869.issue1191964@psf.upfronthosting.co.za>
In-reply-to
Content
First, with the use of Overlapped IO on Windows, BlockingIOError should never come up, and we don't even handle that exception.

As for BrokenPipeError vs. EOF; while we do treat them more or less the same, we aren't killing the process or reporting that the process is dead, and we tell users to check the results of Popen.poll() in the docs.

Could we bubble up BrokenPipeError? Sure. Does it make sense? In the case of Popen.communicate(), exposing the error and changing expected behavior doesn't make sense.

I have implemented and would continue to lean towards continuing to hide BrokenPipeError on the additional API endpoints. Why? If you know that a non-blocking send or receive could result in BrokenPipeError, now you need to wrap all of your communication pieces in BrokenPipeError handlers. Does it give you more control? Yes. But the majority of consumers of this API (and most APIs in general) will experience failure and could lose critical information before they realize, "Oh wait, I need to wrap all of these communication pieces in exception handlers."

I would be open to adding either a keyword-only argument to the methods and/or an instance attribute to enable/disable raising of BrokenPipeErrors during the non-blocking calls if others think that this added level of control. I would lean towards an instance attribute that is defaulted to False.
History
Date User Action Args
2014-06-02 18:47:09josiahcarlsonsetrecipients: + josiahcarlson, gvanrossum, astrand, parameter, vstinner, techtonik, giampaolo.rodola, ajaksu2, ooooooooo, v+python, r.david.murray, cvrebert, ericpruitt, akira, Andrew.Boettcher, rosslagerwall, sbt, martin.panter, janzert, yselivanov, eryksun
2014-06-02 18:47:09josiahcarlsonsetmessageid: <1401734829.14.0.540864752869.issue1191964@psf.upfronthosting.co.za>
2014-06-02 18:47:09josiahcarlsonlinkissue1191964 messages
2014-06-02 18:47:08josiahcarlsoncreate