[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-05-13 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 148757a88f19 by Yury Selivanov in branch '3.5': Issue #26848: Fix asyncio/subprocess.communicate() to handle empty input. https://hg.python.org/cpython/rev/148757a88f19 New changeset f5e69e2f50d7 by Yury Selivanov in branch 'default': Merge 3.5

[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-04-25 Thread Jack O'Connor
Jack O'Connor added the comment: Related: The asyncio communicate() method differs from standard subprocess in how it treats input bytes when stdin is (probably mistakenly) not set to PIPE. Like this: proc = await create_subprocess_shell("sleep 5") await proc.communicate(b"foo") #

[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-04-25 Thread Jack O'Connor
Jack O'Connor added the comment: Thanks for the heads up, Berker, I've re-submitted the PR as https://github.com/python/asyncio/pull/335. -- ___ Python tracker

[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-04-25 Thread Berker Peksag
Berker Peksag added the comment: python/cpython is a semi-official read-only mirror of hg.python.org/cpython. We haven't switched to GitHub yet. You may want to open a pull request to https://github.com/python/asyncio See https://github.com/python/asyncio/wiki/Contributing for details.

[issue26848] asyncio.subprocess's communicate() method mishandles empty input bytes

2016-04-25 Thread Jack O'Connor
New submission from Jack O'Connor: Setting stdin=PIPE and then calling communicate(b"") should close the child's stdin immediately, similar to stdin=DEVNULL. Instead, communicate() treats b"" like None and leaves the child's stdin open, which makes the child hang forever if it tries to read