Skip to content
Snippets Groups Projects
Commit 630d3056 authored by Kyle McCormick's avatar Kyle McCormick Committed by Kyle McCormick
Browse files

Silence DeprecatedEdxPlatformImportWarning by default

parent 090e1068
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,8 @@ When refering to XBlocks, we use the entry-point name. For example,
import importlib.util
import os
import sys
import warnings
from corsheaders.defaults import default_headers as corsheaders_default_headers
from datetime import timedelta
import lms.envs.common
......@@ -115,6 +117,7 @@ from lms.envs.common import (
from path import Path as path
from django.urls import reverse_lazy
from import_shims.warn import DeprecatedEdxPlatformImportWarning
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
from cms.lib.xblock.authoring_mixin import AuthoringMixin
from xmodule.modulestore.edit_info import EditInfoMixin
......@@ -128,6 +131,13 @@ from openedx.core.release import doc_version
# pylint: enable=useless-suppression
# Filter out DeprecatedEdxPlatformImportWarning instances for now.
# We will want these to be generally visible eventually, but while there
# are still a very high number of them, silencing them will be better for
# developer experience.
# See /docs/decisions/0007-sys-path-modification-removal.rst for details.
warnings.filterwarnings("ignore", category=DeprecatedEdxPlatformImportWarning)
################ Enable credit eligibility feature ####################
ENABLE_CREDIT_ELIGIBILITY = True
......
......@@ -32,6 +32,7 @@ Longer TODO:
import importlib.util
import sys
import os
import warnings
from corsheaders.defaults import default_headers as corsheaders_default_headers
from path import Path as path
......@@ -45,6 +46,7 @@ from enterprise.constants import (
ENTERPRISE_OPERATOR_ROLE
)
from import_shims.warn import DeprecatedEdxPlatformImportWarning
from openedx.core.constants import COURSE_KEY_REGEX, COURSE_KEY_PATTERN, COURSE_ID_PATTERN
from openedx.core.djangoapps.theming.helpers_dirs import (
get_themes_unchecked,
......@@ -54,6 +56,13 @@ from openedx.core.lib.derived import derived, derived_collection_entry
from openedx.core.release import doc_version
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
# Filter out DeprecatedEdxPlatformImportWarning instances for now.
# We will want these to be generally visible eventually, but while there
# are still a very high number of them, silencing them will be better for
# developer experience.
# See /docs/decisions/0007-sys-path-modification-removal.rst for details.
warnings.filterwarnings("ignore", category=DeprecatedEdxPlatformImportWarning)
################################### FEATURES ###################################
# .. setting_name: PLATFORM_NAME
# .. setting_default: Your Platform Name Here
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment