diff options
author | Illia Volochii <illia.volochii@gmail.com> | 2021-07-01 13:13:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 13:13:59 (GMT) |
commit | a1092f62492a3fcd6195bea94eccf8d5a300acb1 (patch) | |
tree | e6771f532ecc51ff4665e0f4dd6d715c31b0c04d /Lib/test/test_asyncio/test_events.py | |
parent | 3623aaa78cb9c50edb6da5ac37000446f138b91c (diff) | |
download | cpython-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_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 55fc266..e781769 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -17,6 +17,7 @@ import subprocess import sys import threading import time +import types import errno import unittest from unittest import mock @@ -2163,8 +2164,7 @@ class HandleTests(test_utils.TestCase): '<Handle cancelled>') # decorated function - with self.assertWarns(DeprecationWarning): - cb = asyncio.coroutine(noop) + cb = types.coroutine(noop) h = asyncio.Handle(cb, (), self.loop) self.assertEqual(repr(h), '<Handle noop() at %s:%s>' |