From 0e55b804d8749ed67c0996b719fa78533cce2fb1 Mon Sep 17 00:00:00 2001 From: lauren Date: Thu, 12 Aug 2021 15:27:14 -0400 Subject: [PATCH] build(deps): update to django3 --- Ion.egg-info/requires.txt | 2 +- docs/rtd-requirements.txt | 2 +- intranet/apps/auth/__init__.py | 1 - intranet/routing.py | 4 +++- pytest.ini | 3 +++ requirements.txt | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Ion.egg-info/requires.txt b/Ion.egg-info/requires.txt index fe27931b15e..7883b2268b3 100644 --- a/Ion.egg-info/requires.txt +++ b/Ion.egg-info/requires.txt @@ -11,7 +11,7 @@ channels-redis==3.2.0 contextlib2==0.6.0.post1 cryptography==3.4.7 decorator==5.0.9 -Django==2.2.24 +Django==3.2.6 django-cacheops==6.0 django-cors-headers==3.7.0 django-debug-toolbar==3.2.1 diff --git a/docs/rtd-requirements.txt b/docs/rtd-requirements.txt index cf7f08b3537..0aaf32bef8d 100644 --- a/docs/rtd-requirements.txt +++ b/docs/rtd-requirements.txt @@ -11,7 +11,7 @@ channels-redis==3.2.0 contextlib2==0.6.0.post1 cryptography==3.4.7 decorator==5.0.9 -Django==2.2.24 +Django==3.2.6 django-cacheops==6.0 django-cors-headers==3.7.0 django-debug-toolbar==3.2.1 diff --git a/intranet/apps/auth/__init__.py b/intranet/apps/auth/__init__.py index 5ee9b7729e2..e69de29bb2d 100644 --- a/intranet/apps/auth/__init__.py +++ b/intranet/apps/auth/__init__.py @@ -1 +0,0 @@ -default_app_config = "intranet.apps.auth.apps.AuthConfig" diff --git a/intranet/routing.py b/intranet/routing.py index 287bc35373e..f947c467c3e 100644 --- a/intranet/routing.py +++ b/intranet/routing.py @@ -8,6 +8,7 @@ from channels.generic.websocket import WebsocketConsumer from channels.routing import ProtocolTypeRouter, URLRouter +from django.core.asgi import get_asgi_application from django.urls import re_path from .apps.bus.consumers import BusConsumer @@ -28,6 +29,7 @@ def disconnect(self, code): application = ProtocolTypeRouter( { + "http": get_asgi_application(), "websocket": AuthMiddlewareStack( URLRouter( [ @@ -37,6 +39,6 @@ def disconnect(self, code): re_path(r"^.*$", WebsocketCloseConsumer.as_asgi()), ] ) - ) + ), } ) diff --git a/pytest.ini b/pytest.ini index 438c49dec20..183fed8c622 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,3 +4,6 @@ python_files = tests.py test_*.py filterwarnings = error # Suppress an pysftp warning about not having any ssh known_hosts. ignore:Failed to load HostKeys:UserWarning:pysftp +# Suppress a warning caused by third party libraries + ignore::django.utils.deprecation.RemovedInDjango40Warning + ignore::django.utils.deprecation.RemovedInDjango41Warning diff --git a/requirements.txt b/requirements.txt index cf7f08b3537..0aaf32bef8d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ channels-redis==3.2.0 contextlib2==0.6.0.post1 cryptography==3.4.7 decorator==5.0.9 -Django==2.2.24 +Django==3.2.6 django-cacheops==6.0 django-cors-headers==3.7.0 django-debug-toolbar==3.2.1