From 5919bc22526832d84b8cdb6596e57f9ce60535f3 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 19 Aug 2022 16:01:01 +0200 Subject: [PATCH] Create asyncio loop explicitly (#3804) Creating the asyncio loop explicitly. This fixes the following deprecation warning on Python 3.10: /usr/src/supervisor/supervisor/__main__.py:31: DeprecationWarning: There is no current event loop loop = asyncio.get_event_loop() --- supervisor/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supervisor/__main__.py b/supervisor/__main__.py index 56557bd84..c4e5711e7 100644 --- a/supervisor/__main__.py +++ b/supervisor/__main__.py @@ -28,7 +28,8 @@ if __name__ == "__main__": bootstrap.initialize_logging() # Init async event loop - loop = asyncio.get_event_loop() + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) # Check if all information are available to setup Supervisor bootstrap.check_environment()