Create asyncio loop explicitly
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()
@@ -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()
