[Python-checkins] cpython (3.4): Issue #21454: Fix asyncio.BaseEventLoop.connect_read_pipe doc

victor.stinner python-checkins at python.org
Thu May 29 00:19:22 CEST 2014


http://hg.python.org/cpython/rev/16f399588b2a
changeset:   90889:16f399588b2a
branch:      3.4
parent:      90887:6d90e8df01f4
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu May 29 00:14:03 2014 +0200
summary:
  Issue #21454: Fix asyncio.BaseEventLoop.connect_read_pipe doc

The function sets the the pipe to non-blocking mode.

files:
  Doc/library/asyncio-eventloop.rst |  6 +++---
  Lib/asyncio/events.py             |  6 +++---
  2 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -455,11 +455,11 @@
 
 .. method:: BaseEventLoop.connect_read_pipe(protocol_factory, pipe)
 
-   Register read pipe in eventloop.
+   Register read pipe in eventloop. Set the *pipe* to non-blocking mode.
 
    *protocol_factory* should instantiate object with :class:`Protocol`
-   interface.  pipe is file-like object already switched to nonblocking.
-   Return pair (transport, protocol), where transport support
+   interface.  *pipe* is a :term:`file-like object <file object>`.
+   Return pair ``(transport, protocol)``, where *transport* supports the
    :class:`ReadTransport` interface.
 
    This method is a :ref:`coroutine <coroutine>`.
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -257,11 +257,11 @@
     # Pipes and subprocesses.
 
     def connect_read_pipe(self, protocol_factory, pipe):
-        """Register read pipe in event loop.
+        """Register read pipe in event loop. Set the pipe to non-blocking mode.
 
         protocol_factory should instantiate object with Protocol interface.
-        pipe is file-like object already switched to nonblocking.
-        Return pair (transport, protocol), where transport support
+        pipe is a file-like object.
+        Return pair (transport, protocol), where transport supports the
         ReadTransport interface."""
         # The reason to accept file-like object instead of just file descriptor
         # is: we need to own pipe and close it at transport finishing

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list