From a10dc3efcbba8aa7cc7d1a017f8b22fc4fa8e87c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 28 Nov 2017 11:15:26 +0100 Subject: 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(). --- Lib/test/test_asyncio/test_windows_events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/test/test_asyncio/test_windows_events.py') diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py index c72eef1afdb..b70c0b7ebb8 100644 --- a/Lib/test/test_asyncio/test_windows_events.py +++ b/Lib/test/test_asyncio/test_windows_events.py @@ -1,4 +1,5 @@ import os +import socket import sys import unittest from unittest import mock @@ -36,7 +37,7 @@ class ProactorTests(test_utils.TestCase): self.set_event_loop(self.loop) def test_close(self): - a, b = self.loop._socketpair() + a, b = socket.socketpair() trans = self.loop._make_socket_transport(a, asyncio.Protocol()) f = asyncio.ensure_future(self.loop.sock_recv(b, 100)) trans.close() -- cgit v1.2.3