-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
RFC Start Date
N/A — Already Accepted
Target Plan Accepted Date
N/A — Already Accepted
Target Transition Unblocked Date
Immediately — Transition Already Unblocked
Earliest Breaking Changes Unblocked Date
2025-09-18
Rationale
In Django settings, the FEATURES dictionary has traditionally been used as a mutable container for feature flags. This often leads to confusion between top-level settings and dictionary keys, and makes it difficult to manage operator configurations properly.
To improve clarity and long-term maintainability, we are moving toward treating all feature flags as top-level Django settings, and deprecating the use of FEATURES for this purpose.
Description
Breaking change:
Operators who maintain custom settings modules that write to FEATURES must add the following snippet at the top of their settings file(s) to ensure backwards compatibility:
try:
from openedx.core.lib.features_setting_proxy import FeaturesProxy
FEATURES = FeaturesProxy(globals())
except ImportError:
passThis allows existing references to FEATURES[...] to continue functioning while we transition off of it.
Future changes (timeline TBD):
- Writes to
FEATURES(e.g:FEATURES["SOME_FLAG"] = True) will no longer be supported. - Reads from
FEATURES(e.g:if FEATURES.get("SOME_FLAG"):) should be replaced by top-level settings access (e.g:if settings.SOME_FLAG:). - Reads and writes will continue to work temporarily, but new code should consistently use top-level settings.
Operator Guidance
- Before 2025-09-18, add the
FeaturesProxy(globals())snippet above to any custom settings modules that write to FEATURES. - No other immediate changes are required. Future deprecation notices will provide clear instructions when read/write support is removed.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status