diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index 9a08a4a49021ccb..4f55fc4e3575570 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -247,10 +247,10 @@ DatagramTransport called with :const:`None` as its argument. -BaseSubprocessTransport ------------------------ +SubprocessTransport +------------------- -.. class:: BaseSubprocessTransport +.. class:: SubprocessTransport .. method:: get_pid() @@ -290,7 +290,6 @@ BaseSubprocessTransport .. method:: terminate() Ask the subprocess to stop, as in :meth:`subprocess.Popen.terminate`. - This method is an alias for the :meth:`close` method. On POSIX systems, this method sends SIGTERM to the subprocess. On Windows, the Windows API function TerminateProcess() is called to @@ -298,7 +297,7 @@ BaseSubprocessTransport .. method:: close() - Ask the subprocess to stop by calling the :meth:`terminate` method if the + Ask the subprocess to stop by calling the :meth:`kill` method if the subprocess hasn't returned yet, and close transports of all pipes (*stdin*, *stdout* and *stderr*). diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst index 280b76400374cbd..16b5733dd873332 100644 --- a/Doc/library/asyncio-subprocess.rst +++ b/Doc/library/asyncio-subprocess.rst @@ -112,7 +112,8 @@ Run subprocesses asynchronously using the :mod:`subprocess` module. *shell*, which should not be specified at all. Returns a pair of ``(transport, protocol)``, where *transport* is an - instance of :class:`BaseSubprocessTransport`. + instance of :class:`SubprocessTransport` and *protocol* is an object + instantiated by the *protocol_factory*. This method is a :ref:`coroutine `. @@ -132,7 +133,8 @@ Run subprocesses asynchronously using the :mod:`subprocess` module. the remaining arguments. Returns a pair of ``(transport, protocol)``, where *transport* is an - instance of :class:`BaseSubprocessTransport`. + instance of :class:`SubprocessTransport` and *protocol* is an object + instantiated by the *protocol_factory*. It is the application's responsibility to ensure that all whitespace and metacharacters are quoted appropriately to avoid `shell injection diff --git a/Misc/NEWS.d/next/Documentation/2018-06-28-01-07-44.bpo-33986.19asdA.rst b/Misc/NEWS.d/next/Documentation/2018-06-28-01-07-44.bpo-33986.19asdA.rst new file mode 100644 index 000000000000000..8157ca86dacdf87 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2018-06-28-01-07-44.bpo-33986.19asdA.rst @@ -0,0 +1,3 @@ +Fix wrong class name: asyncio.BaseSubprocessTransport -> SubprocessTransport, +and clarify return objects descriptions of AbstractEventLoop.subprocess_exec(). +Fixed the description of SubprocessTransport.close().