From 972a7eecedfa92b4efd0c588024e3de536c46cad Mon Sep 17 00:00:00 2001 From: Bumsik Kim Date: Wed, 27 Jun 2018 23:58:38 -0400 Subject: [PATCH 1/2] bpo-33986: Fix typo and clarify in asyncio documentation --- Doc/library/asyncio-protocol.rst | 6 +++--- Doc/library/asyncio-subprocess.rst | 6 ++++-- .../Documentation/2018-06-28-01-07-44.bpo-33986.19asdA.rst | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 Misc/NEWS.d/next/Documentation/2018-06-28-01-07-44.bpo-33986.19asdA.rst diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index 9a08a4a49021ccb..7262d0a0be4f59e 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() 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..7d7cd889a7e2ef4 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2018-06-28-01-07-44.bpo-33986.19asdA.rst @@ -0,0 +1,2 @@ +Fix wrong class name: asyncio.BaseSubprocessTransport -> SubprocessTransport, +and clarify return objects descriptions of AbstractEventLoop.subprocess_exec() From e0d764a80ee44f6e1bd52d1734b3b6357afe4625 Mon Sep 17 00:00:00 2001 From: Bumsik Kim Date: Sun, 1 Jul 2018 01:26:32 -0400 Subject: [PATCH 2/2] bpo-33986: Fix doc to reflect changes in 47cd10d7 (or Issue #23347) --- Doc/library/asyncio-protocol.rst | 3 +-- .../Documentation/2018-06-28-01-07-44.bpo-33986.19asdA.rst | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index 7262d0a0be4f59e..4f55fc4e3575570 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -290,7 +290,6 @@ SubprocessTransport .. 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 @@ SubprocessTransport .. 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/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 index 7d7cd889a7e2ef4..8157ca86dacdf87 100644 --- 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 @@ -1,2 +1,3 @@ Fix wrong class name: asyncio.BaseSubprocessTransport -> SubprocessTransport, -and clarify return objects descriptions of AbstractEventLoop.subprocess_exec() +and clarify return objects descriptions of AbstractEventLoop.subprocess_exec(). +Fixed the description of SubprocessTransport.close().