aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_streams.py
diff options
context:
space:
mode:
authorKumar Aditya <kumaraditya@python.org>2025-04-12 12:03:52 +0530
committerGitHub <noreply@github.com>2025-04-12 12:03:52 +0530
commit05d27a84f4a85d777239e95e6d9b6dae8b32c538 (patch)
tree7f60ed0d52046320498cfef2bfb5ef2b9fd382c0 /Lib/test/test_asyncio/test_streams.py
parente6ef47ac229b5c4a62b9c907e4232e350db77ce3 (diff)
downloadcpython-05d27a84f4a85d777239e95e6d9b6dae8b32c538.tar.gz
cpython-05d27a84f4a85d777239e95e6d9b6dae8b32c538.zip
gh-130322: drop deprecation of `asyncio.set_event_loop` (#132349)
Diffstat (limited to 'Lib/test/test_asyncio/test_streams.py')
-rw-r--r--Lib/test/test_asyncio/test_streams.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index 0b47b2b91a1..4fa4384346f 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -68,7 +68,7 @@ class StreamTests(test_utils.TestCase):
try:
reader, writer = self.loop.run_until_complete(open_connection_fut)
finally:
- asyncio._set_event_loop(None)
+ asyncio.set_event_loop(None)
writer.write(b'GET / HTTP/1.0\r\n\r\n')
f = reader.read()
data = self.loop.run_until_complete(f)
@@ -836,8 +836,8 @@ class StreamTests(test_utils.TestCase):
# asyncio issue #184: Ensure that StreamReaderProtocol constructor
# retrieves the current loop if the loop parameter is not set
# Deprecated in 3.10, undeprecated in 3.12
- self.addCleanup(asyncio._set_event_loop, None)
- asyncio._set_event_loop(self.loop)
+ self.addCleanup(asyncio.set_event_loop, None)
+ asyncio.set_event_loop(self.loop)
reader = asyncio.StreamReader()
self.assertIs(reader._loop, self.loop)
@@ -860,8 +860,8 @@ class StreamTests(test_utils.TestCase):
# asyncio issue #184: Ensure that StreamReaderProtocol constructor
# retrieves the current loop if the loop parameter is not set
# Deprecated in 3.10, undeprecated in 3.12
- self.addCleanup(asyncio._set_event_loop, None)
- asyncio._set_event_loop(self.loop)
+ self.addCleanup(asyncio.set_event_loop, None)
+ asyncio.set_event_loop(self.loop)
reader = mock.Mock()
protocol = asyncio.StreamReaderProtocol(reader)
self.assertIs(protocol._loop, self.loop)