summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-05-16 19:39:39 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-05-16 19:39:39 (GMT)
commit8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb (patch)
treea4d780ee11c4d8732b927c8271eb5427428fb39c /Lib/asyncio/selector_events.py
parent7c3ac2d1f82ed44a90de34d5bc6424c64b19ce68 (diff)
parent7661db622892c9731c502ccdd7af130cbfd23f5c (diff)
downloadcpython-8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb.zip
cpython-8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb.tar.gz
cpython-8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb.tar.bz2
Merge 3.5 (Issue #27041)
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r--Lib/asyncio/selector_events.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index 6838d72..29db06b 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -196,7 +196,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
transport = None
try:
protocol = protocol_factory()
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
if sslcontext:
transport = self._make_ssl_transport(
conn, protocol, sslcontext, waiter=waiter,
@@ -314,7 +314,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+ fut = self.create_future()
self._sock_recv(fut, False, sock, n)
return fut
@@ -352,7 +352,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+ fut = self.create_future()
if data:
self._sock_sendall(fut, False, sock, data)
else:
@@ -395,7 +395,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+ fut = self.create_future()
try:
base_events._check_resolved_address(sock, address)
except ValueError as err:
@@ -453,7 +453,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+ fut = self.create_future()
self._sock_accept(fut, False, sock)
return fut