[issue1191964] add non-blocking read and write methods to subprocess.Popen

2019-05-02 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2019-05-01 Thread Josiah Carlson
Josiah Carlson added the comment: Someone else can resurrect this concept and/ore patch if they care about this feature. Best of luck to future readers. -- stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-26 Thread Martin Panter
Martin Panter added the comment: Yes, I think the special return value of None is only standard to the “io” module, which was added in Python 2.6 and 3. And even there it is inconsistent. For what it’s worth, don’t have strong opinions on the special non-blocking and broken pipe cases, as long

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-26 Thread Josiah Carlson
Josiah Carlson added the comment: Non-blocking IO returning a None on "no data currently available" is new to me. It is new to me simply because I don't recall it ever happening in Python 2.x with any socket IO that I ever dealt with, and socket IO is my primary source for non-blocking IO expe

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread Martin Panter
Martin Panter added the comment: Josiah’s code now seems to handle the four special cases like this: * Reading a closed pipe raises BrokenPipeError. This is novel to me, and bends the current definition of the exception. But it appears to be the way Windows works at a lower level, and does mak

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread STINNER Victor
STINNER Victor added the comment: Returning None for non blocking I/O is standard in Python. -- ___ Python tracker ___ ___ Python-bu

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread Akira Li
Akira Li added the comment: > I'm going to be honest; seeing None being returned from a pipe read feels > *really* broken to me. When I get None returned from an IO read operation, my > first instinct is "there can't be anything else coming, why else would it > return None?" It is how it is d

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-25 Thread Josiah Carlson
Josiah Carlson added the comment: I'm going to be honest; seeing None being returned from a pipe read feels *really* broken to me. When I get None returned from an IO read operation, my first instinct is "there can't be anything else coming, why else would it return None?" After changing writ

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-22 Thread Martin Panter
Martin Panter added the comment: Regarding special cases on the reading side, I think there should be an easy way to distinguish them. The existing RawIOBase way is probably as good as any, unless you want to take the chance to invent a better API: * EOF (pipe closed, no more data ever) should

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2015-03-21 Thread Josiah Carlson
Josiah Carlson added the comment: Okay, I'm sorry for falling asleep at the wheel on this. At this point, I don't expect this to go in for 3.5 - but if it has a chance, I'll do what I need to do to get it there. Let me know. I agree with the .communicate() not raising on broken pipe, and read

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: > Do Popen.write_nonblocking() and Popen.read_nonblocking() methods > belong to the second category? Should they raise BrokenPipeError? IMO when you write directly to stdin and read from stdout/stderr of a child process, your code should be written to handle Bro

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-07-24 Thread akira
akira added the comment: STINNER Victor writes: > >> I have implemented and would continue to lean towards continuing to > hide BrokenPipeError on the additional API endpoints. > > FYI asyncio.Process.communicate() ignores BrokenPipeError and > ConnectionResetError, whereas asyncio.Process.stdin

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-07-23 Thread STINNER Victor
STINNER Victor added the comment: > I have implemented and would continue to lean towards continuing to hide > BrokenPipeError on the additional API endpoints. FYI asyncio.Process.communicate() ignores BrokenPipeError and ConnectionResetError, whereas asyncio.Process.stdin.drain() (coroutine t

[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-06-19 Thread STINNER Victor
Changes by STINNER Victor : -- title: asynchronous Subprocess -> add non-blocking read and write methods to subprocess.Popen ___ Python tracker ___ ___