From 6257c1c7acb8bd81d9dc244e7710a1faac87d563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Sun, 26 Mar 2023 18:29:18 -0400 Subject: [PATCH] feat: improve edx-platform logging by silencing a few warnings These warnings were occurring when launching a django shell ("shell" command) or a development server ("runserver"). --- changelog.d/20230326_102311_regis_moar_tasks.md | 1 + tutor/templates/apps/openedx/settings/partials/common_all.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/changelog.d/20230326_102311_regis_moar_tasks.md b/changelog.d/20230326_102311_regis_moar_tasks.md index 16c16f3..f7d4a87 100644 --- a/changelog.d/20230326_102311_regis_moar_tasks.md +++ b/changelog.d/20230326_102311_regis_moar_tasks.md @@ -1,2 +1,3 @@ - [Feature] Make it possible to import the demo course from a different git repository or version. (by @regisb) - [Feature] Add a convenient `do print-edx-platform-setting` command to print the value of an edx-platform setting. (by @regisb) +- [Improvement] Improve edx-platform logging by silencing a couple deprecation warnings. (by @regisb) diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index f23c8e1..222fe9e 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -143,6 +143,11 @@ warnings.filterwarnings("ignore", category=RemovedInDjango40Warning) warnings.filterwarnings("ignore", category=RemovedInDjango41Warning) warnings.filterwarnings("ignore", category=DeprecationWarning, module="lms.djangoapps.course_wiki.plugins.markdownedx.wiki_plugin") warnings.filterwarnings("ignore", category=DeprecationWarning, module="wiki.plugins.links.wiki_plugin") +warnings.filterwarnings("ignore", category=DeprecationWarning, module="boto.plugin") +warnings.filterwarnings("ignore", category=DeprecationWarning, module="botocore.vendored.requests.packages.urllib3._collections") +warnings.filterwarnings("ignore", category=DeprecationWarning, module="storages.backends.s3boto") +warnings.filterwarnings("ignore", category=DeprecationWarning, module="openedx.core.types.admin") +SILENCED_SYSTEM_CHECKS = ["2_0.W001", "fields.W903"] # Email EMAIL_USE_SSL = {{ SMTP_USE_SSL }}