Use BaseEventLoop._thread_id instead of a custom attribute (#124054)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Erik Montnemery
2024-08-17 10:59:39 +02:00
committed by GitHub
parent 7deb9bf30f
commit 6c01e4b99c
5 changed files with 7 additions and 12 deletions

View File

@@ -107,7 +107,6 @@ class HassEventLoopPolicy(asyncio.DefaultEventLoopPolicy):
def new_event_loop(self) -> asyncio.AbstractEventLoop:
"""Get the event loop."""
loop: asyncio.AbstractEventLoop = super().new_event_loop()
setattr(loop, "_thread_ident", threading.get_ident())
loop.set_exception_handler(_async_loop_exception_handler)
if self.debug:
loop.set_debug(True)