Merge 3.4

This commit is contained in:
Victor Stinner 2014-10-10 12:47:01 +02:00
commit 9558e90315
1 changed files with 10 additions and 2 deletions

View File

@ -816,7 +816,7 @@ SSL sockets also have the following additional methods and attributes:
instead, and return the number of bytes read. instead, and return the number of bytes read.
Raise :exc:`SSLWantReadError` or :exc:`SSLWantWriteError` if the socket is 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 As at any time a re-negotiation is possible, a call to :meth:`read` can also
cause write operations. cause write operations.
@ -827,7 +827,7 @@ SSL sockets also have the following additional methods and attributes:
*buf* argument must be an object supporting the buffer interface. *buf* argument must be an object supporting the buffer interface.
Raise :exc:`SSLWantReadError` or :exc:`SSLWantWriteError` if the socket is 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 As at any time a re-negotiation is possible, a call to :meth:`write` can
also cause read operations. also cause read operations.
@ -1729,6 +1729,14 @@ thus several things you need to be aware of:
except ssl.SSLWantWriteError: except ssl.SSLWantWriteError:
select.select([], [sock], []) 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.
Memory BIO Support Memory BIO Support
------------------ ------------------