STINNER Victor added the comment: I opened the issue #23570: Change "with subprocess.Popen():" (context manager) to ignore broken pipe error.
> FAIL: test_broken_pipe_cleanup (test.test_subprocess.ContextManagerTests) Serhiy: see existing test_communicate_epipe() and test_communicate_epipe_only_stdin() tests which are now reliable and portable. You should write more data (2**20 bytes) and set the buffer size to a value larger than the input data, to buffer all data, so the write occurs at stdin.close() in Popen.__exit__(). By the way, instead of an hardcoded value (2**20), support.PIPE_MAX_SIZE may be more appropriate. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21619> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com