From c1cb3874f24378d99d1f460eed7e73ab82be325c Mon Sep 17 00:00:00 2001 From: Finn-Thorben Sell Date: Thu, 9 Sep 2021 15:01:11 +0200 Subject: [PATCH] remove fallback onto ASGIHandler ASGIHandler is considered a django internal api with get_asgi_application being the public counterpart. get_asgi_application is also present since the introduction of django's asgi support so the ImportError should never occur anyways. --- configurations/asgi.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/configurations/asgi.py b/configurations/asgi.py index b257d60..7a28d29 100644 --- a/configurations/asgi.py +++ b/configurations/asgi.py @@ -2,13 +2,7 @@ from . import importer importer.install() -try: - from django.core.asgi import get_asgi_application -except ImportError: # pragma: no cover - from django.core.handlers.asgi import ASGIHandler - - def get_asgi_application(): # noqa - return ASGIHandler() +from django.core.asgi import get_asgi_application # this is just for the crazy ones application = get_asgi_application()