From: Guido van Rossum Date: Fri, 10 Jan 2014 21:26:38 +0000 (-0800) Subject: asyncio: Tiny cleanup in streams.py. X-Git-Tag: v3.4.0b3~186 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efef9d3f25b5070a6430259fd3b5703e94c7843d;p=thirdparty%2FPython%2Fcpython.git asyncio: Tiny cleanup in streams.py. --- diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 7eda5f663251..f01f8629a7f0 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -38,7 +38,7 @@ def open_connection(host=None, port=None, *, if loop is None: loop = events.get_event_loop() reader = StreamReader(limit=limit, loop=loop) - protocol = StreamReaderProtocol(reader) + protocol = StreamReaderProtocol(reader, loop=loop) transport, _ = yield from loop.create_connection( lambda: protocol, host, port, **kwds) writer = StreamWriter(transport, protocol, reader, loop) @@ -151,7 +151,7 @@ class StreamWriter: This exposes write(), writelines(), [can_]write_eof(), get_extra_info() and close(). It adds drain() which returns an optional Future on which you can wait for flow control. It also - adds a transport attribute which references the Transport + adds a transport property which references the Transport directly. """