Support Config(loop='none')
@@ -37,6 +37,7 @@ LIFESPAN = {
"off": "uvicorn.lifespan.off:LifespanOff",
}
LOOP_SETUPS = {
+ "none": None,
"auto": "uvicorn.loops.auto:auto_loop_setup",
"asyncio": "uvicorn.loops.asyncio:asyncio_setup",
"uvloop": "uvicorn.loops.uvloop:uvloop_setup",
@@ -216,6 +217,7 @@ class Config:
def setup_event_loop(self):
loop_setup = import_from_string(LOOP_SETUPS[self.loop])
+ if loop_setup is not None:
loop_setup()
def bind_socket(self):
