[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-04 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- stage: commit review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list m

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e89eb7935ca9 by Gregory P. Smith in branch 'default': merge from 3.5. (moves the issue26372 tests to the proper class) https://hg.python.org/cpython/rev/e89eb7935ca9 -- ___ Python tracker

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3a560525ca50 by Gregory P. Smith in branch '3.5': issue26372 - use os.devnull instead of /dev/null https://hg.python.org/cpython/rev/3a560525ca50 New changeset 52e331b86f2b by Gregory P. Smith in branch 'default': issue26372 - use os.devnull instead

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-04 Thread Martin Panter
Martin Panter added the comment: Maybe use os.devnull instead of "/dev/null"? http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7728/steps/test/logs/stdio == ERROR: test_communicate_BrokenPipeError_stdi

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-03 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, I looked at this issue just today :) -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: the bot hasn't piped up with the changesets. these are the 3.5 and default fixes: remote: notified python-check...@python.org of incoming changeset 883cfb3e28f9 remote: notified python-check...@python.org of incoming changeset 78e81de6d447 -- _

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Lukas - cc'ing you just in case this bug is related to the asyncio subprocess race condition-ish problems you were talking about at pycon. -- nosy: +lukasz.langa ___ Python tracker

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-06-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-lis

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-05-28 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is just the bug I reported in msg236951. Text streams are buffered, thus setting bufsize=0 does not help if universal_newlines=True. Added comments on Rietveld. -- nosy: +serhiy.storchaka ___ Python tracker

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-23 Thread Ned Deily
Changes by Ned Deily : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread Martin Panter
Martin Panter added the comment: Yes I understand bufsize (and universal_newlines) affects any of stdin, stdout and stderr that is set to PIPE. -- ___ Python tracker ___ ___

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
STINNER Victor added the comment: bufsize impacts all streams, no only stdin, no? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread Martin Panter
Martin Panter added the comment: Looking over the code for communicate(), I think setting bufsize=0 should not cause a performance problem in the original use case. Communicate() either calls stdin.write() once, or bypasses the file object and calls os.write(). Only if stdin, stdout, etc were

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
STINNER Victor added the comment: See also issue #23570: Change "with subprocess.Popen():" (context manager) to ignore broken pipe error. -- ___ Python tracker ___ _

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file41941/broken_pipe_error.patch ___ Python tracker ___ __

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
STINNER Victor added the comment: It looks like asyncio.subprocess has a similar issue in Process._feed_stdin, but I'm not sure that stdin.close() can trigger BrokenPipeError. Well, it wouldn't hurd to protect stdin.close() with a try/except BrokenPipeError too ;-) -- versions: +Python

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
Changes by STINNER Victor : -- components: +asyncio nosy: +gvanrossum, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
STINNER Victor added the comment: > Explicitly setting bufsize=0 should be a decent workaround. It kills performances, no? -- ___ Python tracker ___

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread STINNER Victor
STINNER Victor added the comment: > This isn't consistent with the behavior of communicate with a timeout Right, it looks like BrokenPipeError on writing into stdin is ignored in some cases, but not in all cases. Attached patch for Python 3.6 adds two try/except BrokenPipeError with two unit

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-17 Thread Martin Panter
Martin Panter added the comment: Seems a reasonable proposal to me. Originally the bufsize parameter defaulted to 0 so this wouldn’t have been such a problem. Explicitly setting bufsize=0 should be a decent workaround. -- nosy: +martin.panter stage: -> needs patch ___

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-02-16 Thread Memeplex
New submission from Memeplex: When not using a timeout, communicate will raise a BrokenPipeError if the command returns an error code. For example: sp = subprocess.Popen('cat --not-an-option', shell=True, stdin=subprocess.PIPE) time.sleep(.2) sp.communicate(b'hi\n') This isn't consistent with