Загрузить файлы в «venv/Lib/site-packages/uvicorn/loops»

This commit is contained in:
2026-07-02 20:52:38 +00:00
parent a529daf708
commit 95b8997b56
4 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
from __future__ import annotations
import asyncio
import sys
from collections.abc import Callable
def asyncio_loop_factory(use_subprocess: bool = False) -> Callable[[], asyncio.AbstractEventLoop]:
if sys.platform == "win32" and not use_subprocess:
return asyncio.ProactorEventLoop
return asyncio.SelectorEventLoop