diff options
author | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
---|---|---|
committer | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
commit | 6d7ba58f880be618ade07f8ea080fe8c4bf8a896 (patch) | |
tree | b1c931051ffcebd2bd9d61d98d6233ffa289bbce /venv/lib/python3.11/site-packages/uvicorn/loops | |
parent | 4f884c9abc32990b4061a1bb6997b4b37e58ea0b (diff) |
venv
Diffstat (limited to 'venv/lib/python3.11/site-packages/uvicorn/loops')
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/__init__.py | 0 | ||||
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/__init__.cpython-311.pyc | bin | 0 -> 197 bytes | |||
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/asyncio.cpython-311.pyc | bin | 0 -> 816 bytes | |||
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/auto.cpython-311.pyc | bin | 0 -> 787 bytes | |||
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-311.pyc | bin | 0 -> 590 bytes | |||
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/asyncio.py | 10 | ||||
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/auto.py | 11 | ||||
-rw-r--r-- | venv/lib/python3.11/site-packages/uvicorn/loops/uvloop.py | 7 |
8 files changed, 28 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/__init__.py b/venv/lib/python3.11/site-packages/uvicorn/loops/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/__init__.py diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/__init__.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..7bf402c --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/__init__.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/asyncio.cpython-311.pyc b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/asyncio.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..d1bdfe7 --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/asyncio.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/auto.cpython-311.pyc b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/auto.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..74bbf27 --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/auto.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-311.pyc b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..62ad95c --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/asyncio.py b/venv/lib/python3.11/site-packages/uvicorn/loops/asyncio.py new file mode 100644 index 0000000..b24f4fe --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/asyncio.py @@ -0,0 +1,10 @@ +import asyncio +import logging +import sys + +logger = logging.getLogger("uvicorn.error") + + +def asyncio_setup(use_subprocess: bool = False) -> None: + if sys.platform == "win32" and use_subprocess: + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/auto.py b/venv/lib/python3.11/site-packages/uvicorn/loops/auto.py new file mode 100644 index 0000000..2285457 --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/auto.py @@ -0,0 +1,11 @@ +def auto_loop_setup(use_subprocess: bool = False) -> None: + try: + import uvloop # noqa + except ImportError: # pragma: no cover + from uvicorn.loops.asyncio import asyncio_setup as loop_setup + + loop_setup(use_subprocess=use_subprocess) + else: # pragma: no cover + from uvicorn.loops.uvloop import uvloop_setup + + uvloop_setup(use_subprocess=use_subprocess) diff --git a/venv/lib/python3.11/site-packages/uvicorn/loops/uvloop.py b/venv/lib/python3.11/site-packages/uvicorn/loops/uvloop.py new file mode 100644 index 0000000..0e2fd1e --- /dev/null +++ b/venv/lib/python3.11/site-packages/uvicorn/loops/uvloop.py @@ -0,0 +1,7 @@ +import asyncio + +import uvloop + + +def uvloop_setup(use_subprocess: bool = False) -> None: + asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) |