summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
authorIllia Volochii <illia.volochii@gmail.com>2021-07-01 16:13:59 +0300
committerGitHub <noreply@github.com>2021-07-01 15:13:59 +0200
commita1092f62492a3fcd6195bea94eccf8d5a300acb1 (patch)
treee6771f532ecc51ff4665e0f4dd6d715c31b0c04d /Lib/test/test_asyncio/test_events.py
parent3623aaa78cb9c50edb6da5ac37000446f138b91c (diff)
downloadcpython-git-a1092f62492a3fcd6195bea94eccf8d5a300acb1.tar.gz
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.py4
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 55fc266cb7..e78176997a 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>'