gh-130322: drop deprecation of asyncio.set_event_loop (#132349)

This commit is contained in:
Kumar Aditya 2025-04-12 12:03:52 +05:30 committed by GitHub
parent e6ef47ac22
commit 05d27a84f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 46 additions and 64 deletions

View file

@ -74,7 +74,7 @@ class Runner:
loop.shutdown_default_executor(constants.THREAD_JOIN_TIMEOUT))
finally:
if self._set_event_loop:
events._set_event_loop(None)
events.set_event_loop(None)
loop.close()
self._loop = None
self._state = _State.CLOSED
@ -147,7 +147,7 @@ class Runner:
if not self._set_event_loop:
# Call set_event_loop only once to avoid calling
# attach_loop multiple times on child watchers
events._set_event_loop(self._loop)
events.set_event_loop(self._loop)
self._set_event_loop = True
else:
self._loop = self._loop_factory()