mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
3623aaa78c
commit
a1092f6249
11 changed files with 85 additions and 763 deletions
|
@ -1884,10 +1884,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
|
|||
MyProto, sock, None, None, mock.ANY, mock.ANY)
|
||||
|
||||
def test_call_coroutine(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
@asyncio.coroutine
|
||||
def simple_coroutine():
|
||||
pass
|
||||
async def simple_coroutine():
|
||||
pass
|
||||
|
||||
self.loop.set_debug(True)
|
||||
coro_func = simple_coroutine
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue