summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_pep492.py
diff options
context:
space:
mode:
authorIllia Volochii <illia.volochii@gmail.com>2021-07-01 13:13:59 (GMT)
committerGitHub <noreply@github.com>2021-07-01 13:13:59 (GMT)
commita1092f62492a3fcd6195bea94eccf8d5a300acb1 (patch)
treee6771f532ecc51ff4665e0f4dd6d715c31b0c04d /Lib/test/test_asyncio/test_pep492.py
parent3623aaa78cb9c50edb6da5ac37000446f138b91c (diff)
downloadcpython-a1092f62492a3fcd6195bea94eccf8d5a300acb1.zip
cpython-a1092f62492a3fcd6195bea94eccf8d5a300acb1.tar.gz
cpython-a1092f62492a3fcd6195bea94eccf8d5a300acb1.tar.bz2
bpo-43216: Remove @asyncio.coroutine (GH-26369)
Remove the @asyncio.coroutine decorator enabling legacy generator-based coroutines to be compatible with async/await code; remove asyncio.coroutines.CoroWrapper used for wrapping legacy coroutine objects in the debug mode. The decorator has been deprecated since Python 3.8 and the removal was initially scheduled for Python 3.10.
Diffstat (limited to 'Lib/test/test_asyncio/test_pep492.py')
-rw-r--r--Lib/test/test_asyncio/test_pep492.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py
index 4bd50f4..f833f78 100644
--- a/Lib/test/test_asyncio/test_pep492.py
+++ b/Lib/test/test_asyncio/test_pep492.py
@@ -123,20 +123,6 @@ class CoroutineTests(BaseTest):
async def foo(): pass
self.assertTrue(asyncio.iscoroutinefunction(foo))
- def test_function_returning_awaitable(self):
- class Awaitable:
- def __await__(self):
- return ('spam',)
-
- with self.assertWarns(DeprecationWarning):
- @asyncio.coroutine
- def func():
- return Awaitable()
-
- coro = func()
- self.assertEqual(coro.send(None), 'spam')
- coro.close()
-
def test_async_def_coroutines(self):
async def bar():
return 'spam'