diff --git a/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md b/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md index f677a60..ad88d1c 100644 --- a/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md +++ b/changelog.d/20231212_140233_maria.grimaldi_fix_django4_import_errors.md @@ -1,12 +1 @@ - - - - -[Bugfix] Wrap Django5 warning imports in try-except block to avoid failures in django3 that's still in use in edx-platform's master branch. +- [Bugfix] Wrap Django5 warning imports in try-except block to avoid failures in django3 that's still in use in edx-platform's master branch (by @mariajgrimaldi). diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index ec68e3e..cf3bc44 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -155,6 +155,10 @@ try: warnings.filterwarnings("ignore", category=RemovedInDjango50Warning) warnings.filterwarnings("ignore", category=RemovedInDjango51Warning) except ImportError: + # REMOVE-AFTER-V18: + # In Quince, edx-platform uses Django 5. But on master, edx-platform still uses Django 3. + # So, Tutor v17 needs to silence these warnings, whereas Tutor v17-nightly fails to import them. + # Once edx-platform master is upgraded to Django 5, the try-except wrapper can be removed. pass warnings.filterwarnings("ignore", category=DeprecationWarning, module="wiki.plugins.links.wiki_plugin")