Skip to content

Commit

Permalink
drop 3.7 support and update aiohttp
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Nov 21, 2023
1 parent 0313145 commit 248238b
Show file tree
Hide file tree
Showing 4 changed files with 417 additions and 524 deletions.
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

0 comments on commit 248238b

Please sign in to comment.