mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
Python 3.16 removes asyncio event loop policies, which Home Assistant relies on to configure every loop it runs: the loop that serves a running instance, and the loops the command line scripts create. HassEventLoopPolicy only overrode new_event_loop(), so it becomes a create_event_loop() factory building asyncio.EventLoop, the same platform loop class the default policy selected. The policy that scripts/__init__.py installed configured the asyncio.run() calls inside each script, so the factory is passed at those call sites instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRmnu5HiXQUaHcHnNCvBSU