@@ -309,35 +309,20 @@ async def _run_app(
309309 port : Optional [int ] = None ,
310310 path : Union [PathLike , TypingIterable [PathLike ], None ] = None ,
311311 sock : Optional [Union [socket .socket , TypingIterable [socket .socket ]]] = None ,
312- shutdown_timeout : float = 60.0 ,
313- keepalive_timeout : float = 75.0 ,
314312 ssl_context : Optional [SSLContext ] = None ,
315313 print : Optional [Callable [..., None ]] = print ,
316314 backlog : int = 128 ,
317- access_log_class : Type [AbstractAccessLogger ] = AccessLogger ,
318- access_log_format : str = AccessLogger .LOG_FORMAT ,
319- access_log : Optional [logging .Logger ] = access_logger ,
320- handle_signals : bool = True ,
321315 reuse_address : Optional [bool ] = None ,
322316 reuse_port : Optional [bool ] = None ,
323- handler_cancellation : bool = False ,
317+ ** kwargs : Any , # TODO(PY311): Use Unpack
324318) -> None :
325319 # An internal function to actually do all dirty job for application running
326320 if asyncio .iscoroutine (app ):
327321 app = await app
328322
329323 app = cast (Application , app )
330324
331- runner = AppRunner (
332- app ,
333- handle_signals = handle_signals ,
334- access_log_class = access_log_class ,
335- access_log_format = access_log_format ,
336- access_log = access_log ,
337- keepalive_timeout = keepalive_timeout ,
338- shutdown_timeout = shutdown_timeout ,
339- handler_cancellation = handler_cancellation ,
340- )
325+ runner = AppRunner (app , ** kwargs )
341326
342327 await runner .setup ()
343328
@@ -484,6 +469,7 @@ def run_app(
484469 reuse_port : Optional [bool ] = None ,
485470 handler_cancellation : bool = False ,
486471 loop : Optional [asyncio .AbstractEventLoop ] = None ,
472+ ** kwargs : Any ,
487473) -> None :
488474 """Run an app locally"""
489475 if loop is None :
@@ -515,6 +501,7 @@ def run_app(
515501 reuse_address = reuse_address ,
516502 reuse_port = reuse_port ,
517503 handler_cancellation = handler_cancellation ,
504+ ** kwargs ,
518505 )
519506 )
520507
0 commit comments