From 00adba695c5f61408a2d4df5b1cb3ba7091f9502 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Thu, 16 Apr 2020 13:54:07 -0400 Subject: [PATCH] Stop logging deprecation warnings outside devstack (#23742) The upgrade to Django 2.2 has caused a spike in production logging due to RemovedInDjango30Warning deprecation warnings. For now, turn off logging of DeprecationWarning, ImportWarning, and PendingDeprecationWarning whenever we're using WSGI (they'll continue to be logged in devstack). We may eventually want this behind an easily flipped toggle, but for now just remove it to get this resolved quickly. --- cms/wsgi.py | 3 --- lms/wsgi.py | 3 --- lms/wsgi_apache_lms.py | 3 --- 3 files changed, 9 deletions(-) diff --git a/cms/wsgi.py b/cms/wsgi.py index 0b9b71dd0a..0250f2de22 100644 --- a/cms/wsgi.py +++ b/cms/wsgi.py @@ -8,9 +8,6 @@ It exposes a module-level variable named ``application``. Django's ``WSGI_APPLICATION`` setting. """ -from openedx.core.lib.logsettings import log_python_warnings -log_python_warnings() - # Patch the xml libs before anything else. from safe_lxml import defuse_xml_libs defuse_xml_libs() diff --git a/lms/wsgi.py b/lms/wsgi.py index cb3e639b17..d71a2c26eb 100644 --- a/lms/wsgi.py +++ b/lms/wsgi.py @@ -8,9 +8,6 @@ It exposes a module-level variable named ``application``. Django's ``WSGI_APPLICATION`` setting. """ -from openedx.core.lib.logsettings import log_python_warnings -log_python_warnings() - # Patch the xml libs from safe_lxml import defuse_xml_libs defuse_xml_libs() diff --git a/lms/wsgi_apache_lms.py b/lms/wsgi_apache_lms.py index 4ac6278c0b..09c038ada8 100644 --- a/lms/wsgi_apache_lms.py +++ b/lms/wsgi_apache_lms.py @@ -5,9 +5,6 @@ This module contains the WSGI application used for Apache deployment. It exposes a module-level variable named ``application``. """ -from openedx.core.lib.logsettings import log_python_warnings -log_python_warnings() - # Patch the xml libs before anything else. from safe_lxml import defuse_xml_libs defuse_xml_libs()