gh-127949: deprecate asyncio.set_event_loop (#128218)

Deprecate `asyncio.set_event_loop` to be removed in Python 3.16.
This commit is contained in:
Kumar Aditya 2024-12-24 19:24:28 +05:30 committed by GitHub
parent 3ddd70ceaa
commit 9fce906825
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 77 additions and 55 deletions

View file

@ -1116,11 +1116,11 @@ class TestFunctional(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(self.loop)
asyncio._set_event_loop(self.loop)
def tearDown(self):
self.loop.close()
asyncio.set_event_loop(None)
asyncio._set_event_loop(None)
def test_add_reader_invalid_argument(self):
def assert_raises():