summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-18 11:36:45 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-03-18 11:36:45 +0100
commit16b312187af2a3dfab2e5030076e8b8836b2044d (patch)
tree9f2dd3b318bfb5d503ef51f17a22d193238a72db
parent26c6fedd884e7b61ac397105d65e2d27984406f4 (diff)
downloadtrollius-git-16b312187af2a3dfab2e5030076e8b8836b2044d.tar.gz
Python issue #23456: Add missing @coroutine decorators
-rw-r--r--asyncio/base_subprocess.py1
-rw-r--r--asyncio/locks.py3
-rw-r--r--asyncio/streams.py1
3 files changed, 5 insertions, 0 deletions
diff --git a/asyncio/base_subprocess.py b/asyncio/base_subprocess.py
index d18f3e8..c1477b8 100644
--- a/asyncio/base_subprocess.py
+++ b/asyncio/base_subprocess.py
@@ -211,6 +211,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
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/asyncio/locks.py b/asyncio/locks.py
index b943e9d..41a68c6 100644
--- a/asyncio/locks.py
+++ b/asyncio/locks.py
@@ -162,6 +162,7 @@ class Lock:
# 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 @@ class Condition:
def __exit__(self, *args):
pass
+ @coroutine
def __iter__(self):
# See comment in Lock.__iter__().
yield from self.acquire()
@@ -446,6 +448,7 @@ class Semaphore:
def __exit__(self, *args):
pass
+ @coroutine
def __iter__(self):
# See comment in Lock.__iter__().
yield from self.acquire()
diff --git a/asyncio/streams.py b/asyncio/streams.py
index 7ff16a4..64ff3d2 100644
--- a/asyncio/streams.py
+++ b/asyncio/streams.py
@@ -378,6 +378,7 @@ class StreamReader:
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