From: Florimond Manca Date: Fri, 23 Aug 2019 00:26:09 +0000 (+0200) Subject: Add backend param to ASGIDispatcher (#270) X-Git-Tag: 0.7.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31748a30255f809e7947cf03631e3c93ae6e665c;p=thirdparty%2Fhttpx.git Add backend param to ASGIDispatcher (#270) --- diff --git a/httpx/dispatch/asgi.py b/httpx/dispatch/asgi.py index 4e3f3dcd..6c1fc267 100644 --- a/httpx/dispatch/asgi.py +++ b/httpx/dispatch/asgi.py @@ -48,13 +48,13 @@ class ASGIDispatch(AsyncDispatcher): raise_app_exceptions: bool = True, root_path: str = "", client: typing.Tuple[str, int] = ("127.0.0.1", 123), + backend: ConcurrencyBackend = None, ) -> None: self.app = app self.raise_app_exceptions = raise_app_exceptions self.root_path = root_path self.client = client - # This will need to be turned into a parameter on this class at some point. - self.backend: ConcurrencyBackend = AsyncioBackend() + self.backend = AsyncioBackend() if backend is None else backend async def send( self,