[Python-checkins] cpython (3.4): Issue #22564: ssl doc: mention asyncio in the non-blocking section

victor.stinner python-checkins at python.org
Fri Oct 10 13:05:58 CEST 2014


https://hg.python.org/cpython/rev/61fbd3d5c307
changeset:   92918:61fbd3d5c307
branch:      3.4
parent:      92916:8338ae599931
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Oct 10 12:45:10 2014 +0200
summary:
  Issue #22564: ssl doc: mention asyncio in the non-blocking section

files:
  Doc/library/ssl.rst |  12 ++++++++++--
  1 files changed, 10 insertions(+), 2 deletions(-)


diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -794,7 +794,7 @@
    instead, and return the number of bytes read.
 
    Raise :exc:`SSLWantReadError` or :exc:`SSLWantWriteError` if the socket is
-   non-blocking and the read would block.
+   :ref:`non-blocking <ssl-nonblocking>` and the read would block.
 
    As at any time a re-negotiation is possible, a call to :meth:`read` can also
    cause write operations.
@@ -805,7 +805,7 @@
    *buf* argument must be an object supporting the buffer interface.
 
    Raise :exc:`SSLWantReadError` or :exc:`SSLWantWriteError` if the socket is
-   non-blocking and the write would block.
+   :ref:`non-blocking <ssl-nonblocking>` and the write would block.
 
    As at any time a re-negotiation is possible, a call to :meth:`write` can
    also cause read operations.
@@ -1691,6 +1691,14 @@
         except ssl.SSLWantWriteError:
             select.select([], [sock], [])
 
+.. seealso::
+
+   The :mod:`asyncio` module supports non-blocking SSL sockets and provides a
+   higher level API. It polls for events using the :mod:`selectors` module and
+   handles :exc:`SSLWantWriteError`, :exc:`SSLWantReadError` and
+   :exc:`BlockingIOError` exceptions. It runs the SSL handshake asynchronously
+   as well.
+
 
 .. _ssl-security:
 

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


More information about the Python-checkins mailing list