diff -r 9913ab26ca6f Doc/library/asyncio-subprocess.rst --- a/Doc/library/asyncio-subprocess.rst Sat Jun 14 10:23:20 2014 +0100 +++ b/Doc/library/asyncio-subprocess.rst Sat Jun 14 23:17:10 2014 +0700 @@ -22,7 +22,7 @@ .. function:: create_subprocess_shell(cmd, stdin=None, stdout=None, stderr=None, loop=None, limit=None, \*\*kwds) - Run the shell command *cmd* given as a string. Return a :class:`~asyncio.subprocess.Process` + Run the shell command *cmd* given as a string or a bytes. Return a :class:`~asyncio.subprocess.Process` instance. The optional *limit* parameter sets the buffer limit passed to the @@ -94,7 +94,7 @@ .. method:: BaseEventLoop.subprocess_shell(protocol_factory, cmd, \*, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, \*\*kwargs) - Create a subprocess from *cmd*, which is a string using the platform's + Create a subprocess from *cmd*, which is a string or a bytes using the platform's "shell" syntax. This is similar to the standard library :class:`subprocess.Popen` class called with ``shell=True``. diff -r 9913ab26ca6f Lib/asyncio/base_events.py --- a/Lib/asyncio/base_events.py Sat Jun 14 10:23:20 2014 +0100 +++ b/Lib/asyncio/base_events.py Sat Jun 14 23:17:10 2014 +0700 @@ -644,7 +644,7 @@ universal_newlines=False, shell=True, bufsize=0, **kwargs): if not isinstance(cmd, (bytes, str)): - raise ValueError("cmd must be a string") + raise ValueError("cmd must be a string or a bytes") if universal_newlines: raise ValueError("universal_newlines must be False") if not shell: diff -r 9913ab26ca6f Lib/test/test_asyncio/test_base_events.py --- a/Lib/test/test_asyncio/test_base_events.py Sat Jun 14 10:23:20 2014 +0100 +++ b/Lib/test/test_asyncio/test_base_events.py Sat Jun 14 23:17:10 2014 +0700 @@ -320,7 +320,7 @@ asyncio.SubprocessProtocol, *args, bufsize=4096) def test_subprocess_shell_invalid_args(self): - # expected a string, not an int or a list + # expected a string or a bytes, not an int or a list self.assertRaises(TypeError, self.loop.run_until_complete, self.loop.subprocess_shell, asyncio.SubprocessProtocol, 123)