Start waffle namespace deprecation

By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
This commit is contained in:
Régis Behmo
2020-11-05 09:10:37 +01:00
parent 4344da80a1
commit a16cd71046
45 changed files with 150 additions and 144 deletions

View File

@@ -3,12 +3,12 @@ This module contains various configuration settings via
waffle switches for the instructor_task app.
"""
from edx_toggles.toggles import WaffleFlagNamespace, WaffleSwitchNamespace
from edx_toggles.toggles import LegacyWaffleFlagNamespace, LegacyWaffleSwitchNamespace
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag
WAFFLE_NAMESPACE = 'instructor_task'
INSTRUCTOR_TASK_WAFFLE_FLAG_NAMESPACE = WaffleFlagNamespace(name=WAFFLE_NAMESPACE)
WAFFLE_SWITCHES = WaffleSwitchNamespace(name=WAFFLE_NAMESPACE)
INSTRUCTOR_TASK_WAFFLE_FLAG_NAMESPACE = LegacyWaffleFlagNamespace(name=WAFFLE_NAMESPACE)
WAFFLE_SWITCHES = LegacyWaffleSwitchNamespace(name=WAFFLE_NAMESPACE)
# Waffle switches
OPTIMIZE_GET_LEARNERS_FOR_COURSE = 'optimize_get_learners_for_course'