Skip to content

Commit 92174e0

Browse files
Add deprecation notes for OptimizleyConfigV2 (#360)
Summary ------- - Deprecate experiments_map for OptimizelyFeature - Note added for experiments_map in OptimizelyConfig stating it is for legacy projects only OptimizelyFeature experiments_map is deprecated, users shall use experiment_rules and delivery_rules. Test plan --------- - FSC Issues ------ - N/A
1 parent de91292 commit 92174e0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

optimizely/optimizely_config.py

+10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ def __init__(self, revision, experiments_map, features_map, datafile=None,
2222
sdk_key=None, environment_key=None, attributes=None, events=None,
2323
audiences=None):
2424
self.revision = revision
25+
26+
# This experiments_map is for experiments of legacy projects only.
27+
# For flag projects, experiment keys are not guaranteed to be unique
28+
# across multiple flags, so this map may not include all experiments
29+
# when keys conflict.
2530
self.experiments_map = experiments_map
31+
2632
self.features_map = features_map
2733
self._datafile = datafile
2834
self.sdk_key = sdk_key or ''
@@ -52,7 +58,11 @@ class OptimizelyFeature(object):
5258
def __init__(self, id, key, experiments_map, variables_map):
5359
self.id = id
5460
self.key = key
61+
62+
# This experiments_map is now deprecated,
63+
# Please use delivery_rules and experiment_rules
5564
self.experiments_map = experiments_map
65+
5666
self.variables_map = variables_map
5767
self.delivery_rules = []
5868
self.experiment_rules = []

0 commit comments

Comments
 (0)