mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
asyncio: use directly socket.socketpair() (#4597)
Since Python 3.5, socket.socketpair() is also available on Windows, and so can be used directly, rather than using asyncio.windows_utils.socketpair().
This commit is contained in:
parent
92f9339a58
commit
a10dc3efcb
7 changed files with 9 additions and 36 deletions
|
@ -296,9 +296,6 @@ class PipeServer(object):
|
|||
class _WindowsSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
||||
"""Windows version of selector event loop."""
|
||||
|
||||
def _socketpair(self):
|
||||
return windows_utils.socketpair()
|
||||
|
||||
|
||||
class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
|
||||
"""Windows version of proactor event loop using IOCP."""
|
||||
|
@ -308,9 +305,6 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
|
|||
proactor = IocpProactor()
|
||||
super().__init__(proactor)
|
||||
|
||||
def _socketpair(self):
|
||||
return windows_utils.socketpair()
|
||||
|
||||
@coroutine
|
||||
def create_pipe_connection(self, protocol_factory, address):
|
||||
f = self._proactor.connect_pipe(address)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue