Compare commits

..

No commits in common. "a1652da2c89bb21f3fdc71780b63b1de2dff11f0" and "f533cb80cbbb7acdf9ce1978cfba095ce5eeedaa" have entirely different histories.

4 changed files with 9 additions and 20 deletions

View File

@ -1184,13 +1184,10 @@ Allows customizing how exceptions are handled in the event loop.
* 'message': Error message;
* 'exception' (optional): Exception object;
* 'future' (optional): :class:`asyncio.Future` instance;
* 'task' (optional): :class:`asyncio.Task` instance;
* 'handle' (optional): :class:`asyncio.Handle` instance;
* 'protocol' (optional): :ref:`Protocol <asyncio-protocol>` instance;
* 'transport' (optional): :ref:`Transport <asyncio-transport>` instance;
* 'socket' (optional): :class:`socket.socket` instance;
* 'asyncgen' (optional): Asynchronous generator that caused
the exception.
* 'socket' (optional): :class:`socket.socket` instance.
.. note::

View File

@ -1525,6 +1525,14 @@ class BaseEventLoop(events.AbstractEventLoop):
self, protocol_factory, sock,
*, ssl=None,
ssl_handshake_timeout=None):
"""Handle an accepted connection.
This is used by servers that accept connections outside of
asyncio but that use asyncio to handle connections.
This method is a coroutine. When completed, the coroutine
returns a (transport, protocol) pair.
"""
if sock.type != socket.SOCK_STREAM:
raise ValueError(f'A Stream Socket was expected, got {sock!r}')

View File

@ -418,20 +418,6 @@ class AbstractEventLoop:
"""
raise NotImplementedError
async def connect_accepted_socket(
self, protocol_factory, sock,
*, ssl=None,
ssl_handshake_timeout=None):
"""Handle an accepted connection.
This is used by servers that accept connections outside of
asyncio, but use asyncio to handle connections.
This method is a coroutine. When completed, the coroutine
returns a (transport, protocol) pair.
"""
raise NotImplementedError
async def create_datagram_endpoint(self, protocol_factory,
local_addr=None, remote_addr=None, *,
family=0, proto=0, flags=0,

View File

@ -1,2 +0,0 @@
Added missing connect_accepted_socket() method to
``asyncio.AbstractEventLoop``.