summaryrefslogtreecommitdiff
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-11-05 15:27:41 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-11-05 15:27:41 +0100
commit004adb91f6e05ac711b0554bbd0415a48fed623c (patch)
tree9325ab7de23395c0ceac21cf41c49be001be4240 /Lib/asyncio/unix_events.py
parent7e8b8678f141d4e8198002972219895280b2d62d (diff)
downloadcpython-git-004adb91f6e05ac711b0554bbd0415a48fed623c.tar.gz
asyncio: Move loop attribute to _FlowControlMixin
Move the _loop attribute from the constructor of _SelectorTransport, _ProactorBasePipeTransport and _UnixWritePipeTransport classes to the constructor of the _FlowControlMixin class. Add also an assertion to explicit that the parent class must ensure that the loop is defined (not None)
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 93c8c1c819..b16f946ae4 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -369,9 +369,8 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
transports.WriteTransport):
def __init__(self, loop, pipe, protocol, waiter=None, extra=None):
- super().__init__(extra)
+ super().__init__(extra, loop)
self._extra['pipe'] = pipe
- self._loop = loop
self._pipe = pipe
self._fileno = pipe.fileno()
mode = os.fstat(self._fileno).st_mode