summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_typing.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2019-05-16 14:52:10 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-16 14:52:10 (GMT)
commit68b34a720485f399e8699235b8f4e08f227dd43b (patch)
tree49bbe28097e67a4ffbf9c39d9b5b143c5cbe607d /Lib/test/test_typing.py
parentdbacfc227381fbc7b3c886ea0bd7806ab3dc62c2 (diff)
downloadcpython-68b34a720485f399e8699235b8f4e08f227dd43b.zip
cpython-68b34a720485f399e8699235b8f4e08f227dd43b.tar.gz
cpython-68b34a720485f399e8699235b8f4e08f227dd43b.tar.bz2
bpo-36921: Deprecate @coroutine for sake of async def (GH-13346)
The second attempt. Now deprecate `@coroutine` only, keep `yield from fut` as is. https://bugs.python.org/issue36921
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r--Lib/test/test_typing.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 0d66ebb..a547fe2 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -1708,9 +1708,8 @@ class AsyncIteratorWrapper(typing.AsyncIterator[T_a]):
def __aiter__(self) -> typing.AsyncIterator[T_a]:
return self
- @asyncio.coroutine
- def __anext__(self) -> T_a:
- data = yield from self.value
+ async def __anext__(self) -> T_a:
+ data = await self.value
if data:
return data
else: