11import typing
2+ import warnings
23
34from flag_engine .context .mappers import (
45 map_environment_identity_to_context ,
@@ -28,6 +29,10 @@ def get_environment_feature_states(
2829
2930 :param environment: the environment model object
3031 """
32+ warnings .warn (
33+ "`get_environment_feature_states` is deprecated, use `get_evaluation_result` instead." ,
34+ DeprecationWarning ,
35+ )
3136 if environment .get_hide_disabled_flags ():
3237 return [fs for fs in environment .feature_states if fs .enabled ]
3338 return environment .feature_states
@@ -42,6 +47,10 @@ def get_environment_feature_state(
4247 :param environment: the environment model object
4348 :param feature_name: the name of the feature to get the feature state for
4449 """
50+ warnings .warn (
51+ "`get_environment_feature_state` is deprecated, use `get_evaluation_result` instead." ,
52+ DeprecationWarning ,
53+ )
4554 try :
4655 return next (
4756 filter (lambda f : f .feature .name == feature_name , environment .feature_states )
@@ -65,6 +74,10 @@ def get_identity_feature_states(
6574 :return: list of feature state models based on the environment, any matching
6675 segments and any specific identity overrides
6776 """
77+ warnings .warn (
78+ "`get_identity_feature_states` is deprecated, use `get_evaluation_result` instead." ,
79+ DeprecationWarning ,
80+ )
6881 context = map_environment_identity_to_context (
6982 environment = environment ,
7083 identity = identity ,
@@ -96,6 +109,10 @@ def get_identity_feature_state(
96109 :return: feature state model based on the environment, any matching
97110 segments and any specific identity overrides
98111 """
112+ warnings .warn (
113+ "`get_identity_feature_state` is deprecated, use `get_evaluation_result` instead." ,
114+ DeprecationWarning ,
115+ )
99116 context = map_environment_identity_to_context (
100117 environment = environment ,
101118 identity = identity ,
0 commit comments