[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (asyncio)
victor.stinner
python-checkins at python.org
Wed Mar 18 11:40:36 CET 2015
https://hg.python.org/cpython/rev/d78727872e05
changeset: 95033:d78727872e05
parent: 95031:4fb829f8c04d
parent: 95032:6f7ed6e95ea8
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Mar 18 11:37:54 2015 +0100
summary:
Merge 3.4 (asyncio)
files:
Lib/asyncio/base_subprocess.py | 1 +
Lib/asyncio/locks.py | 3 +++
Lib/asyncio/streams.py | 1 +
3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py
--- a/Lib/asyncio/base_subprocess.py
+++ b/Lib/asyncio/base_subprocess.py
@@ -211,6 +211,7 @@
waiter.set_result(returncode)
self._exit_waiters = None
+ @coroutine
def _wait(self):
"""Wait until the process exit and return the process return code.
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py
--- a/Lib/asyncio/locks.py
+++ b/Lib/asyncio/locks.py
@@ -162,6 +162,7 @@
# always raises; that's how the with-statement works.
pass
+ @coroutine
def __iter__(self):
# This is not a coroutine. It is meant to enable the idiom:
#
@@ -362,6 +363,7 @@
def __exit__(self, *args):
pass
+ @coroutine
def __iter__(self):
# See comment in Lock.__iter__().
yield from self.acquire()
@@ -446,6 +448,7 @@
def __exit__(self, *args):
pass
+ @coroutine
def __iter__(self):
# See comment in Lock.__iter__().
yield from self.acquire()
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py
--- a/Lib/asyncio/streams.py
+++ b/Lib/asyncio/streams.py
@@ -378,6 +378,7 @@
else:
self._paused = True
+ @coroutine
def _wait_for_data(self, func_name):
"""Wait until feed_data() or feed_eof() is called."""
# StreamReader uses a future to link the protocol feed_data() method
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list