Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom IOLOOPs #2435

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
208a37a
use asyncio.run(..., loop_factory) to avoid asyncio.set_event_loop_po…
graingert Oct 14, 2023
8021788
only shutdown the default executor on 3.9
graingert Oct 14, 2023
db8f9a1
rename LoopSetupType to LoopFactoryType
graingert Oct 20, 2023
6247222
remove redundant UvicornWorker.init_process
graingert Oct 20, 2023
a8df5b9
fix linter
Kludex Apr 14, 2024
849169f
fix linter
Kludex Apr 14, 2024
2dafe54
Fix coverage
gnir-work Aug 18, 2024
100d1ad
Allow passing a custom loop
gnir-work Aug 18, 2024
fcb1cbe
Add tests for `_compat.py`
gnir-work Aug 18, 2024
66c61cd
Merge branch 'master' into feature/support-custom-ioloop
Kludex Nov 20, 2024
994955d
Merge branch 'master' into feature/support-custom-ioloop
Kludex Dec 15, 2024
30b8093
fix linting
graingert Dec 30, 2024
d9db4e4
loop factory should not take use_subprocess
graingert Dec 30, 2024
16c120b
remove redundant import
graingert Dec 30, 2024
dc2c956
update docs
graingert Dec 30, 2024
dc77349
Update tests/test_compat.py
graingert Dec 30, 2024
4d1dec7
use asyncio.EventLoop on 3.13+
graingert Dec 30, 2024
606dbd9
sort out coverage
graingert Dec 30, 2024
165bda1
fix coverage more
graingert Dec 30, 2024
bd58e8a
fix typo
graingert Dec 30, 2024
5d629fa
Revert "fix typo"
graingert Dec 30, 2024
58419af
Revert "fix coverage more"
graingert Dec 30, 2024
2c0f7c1
Revert "sort out coverage"
graingert Dec 30, 2024
765b1e4
Revert "use asyncio.EventLoop on 3.13+"
graingert Dec 30, 2024
b41ae15
Merge branch 'master' into feature/support-custom-ioloop
graingert Jan 1, 2025
91a6a4e
Merge branch 'master' into feature/support-custom-ioloop
graingert Jan 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix linter
  • Loading branch information
Kludex committed Aug 18, 2024
commit a8df5b9050d871c069ed8748c72b5eeeabc75e42
6 changes: 0 additions & 6 deletions uvicorn/loops/asyncio.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
from __future__ import annotations

import asyncio
import logging
import sys
from collections.abc import Callable
from typing import TypeVar

_T = TypeVar("_T")

logger = logging.getLogger("uvicorn.error")


def asyncio_loop_factory(use_subprocess: bool = False) -> Callable[[], asyncio.AbstractEventLoop]: