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

drop 3.7 support and update aiohttp #196

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions aiomisc/service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .udp import UDPServer
from .uvicorn import UvicornApplication, UvicornService


__all__ = (
"MemoryTracer",
"ProcessService",
Expand Down
5 changes: 5 additions & 0 deletions aiomisc/service/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ class AIOHTTPService(Service):

site: SockSite
runner: BaseRunner
handler_cancellation: bool = True

def __init__(
self, address: Optional[str] = "localhost", port: Optional[int] = None,
sock: Optional[socket.socket] = None, shutdown_timeout: int = 5,
handler_cancellation: bool = handler_cancellation,
runner_kwargs: Optional[RunnerKwargsType] = None,
**kwds: Any,
):
Expand Down Expand Up @@ -58,6 +60,9 @@ def __init__(
self.runner_kwargs.setdefault(
"access_log_format", AccessLogger.LOG_FORMAT,
)
self.runner_kwargs.setdefault(
"handler_cancellation", handler_cancellation,
)

super().__init__(**kwds)

Expand Down
Loading