From 72e31423755eb91de62da47ffbc60aba7c918c1e Mon Sep 17 00:00:00 2001 From: stj <66305+stj@users.noreply.github.com> Date: Tue, 1 Oct 2019 15:45:30 -0700 Subject: [PATCH] Use Iterable hint instead of Sequence Given that the `FrozenList` type hint is `Union[List[_T], Iterable[_T]]` the Application middleware type should not restrict to `Sequence` and support all `Iterable` types. --- aiohttp/web_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp/web_app.py b/aiohttp/web_app.py index a70ff506fd0..f668feeae4b 100644 --- a/aiohttp/web_app.py +++ b/aiohttp/web_app.py @@ -75,7 +75,7 @@ class Application(MutableMapping[str, Any]): def __init__(self, *, logger: logging.Logger=web_logger, - middlewares: Sequence[_Middleware]=(), + middlewares: Iterable[_Middleware]=(), handler_args: Mapping[str, Any]=None, client_max_size: int=1024**2, debug: Any=... # mypy doesn't support ellipsis