Skip to content

Commit f31b59d

Browse files
committed
add deprecation instead of updating function
1 parent 296d45f commit f31b59d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ldclient/config.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from threading import Event
88
from typing import Callable, List, Optional, Set
9+
import warnings
910

1011
from ldclient.feature_store import InMemoryFeatureStore
1112
from ldclient.hook import Hook
@@ -303,8 +304,11 @@ def __init__(
303304
def copy_with_new_sdk_key(self, new_sdk_key: str) -> 'Config':
304305
"""Returns a new ``Config`` instance that is the same as this one, except for having a different SDK key.
305306
307+
DEPRECATED: This method is deprecated and will be removed in a future version.
308+
306309
:param new_sdk_key: the new SDK key
307310
"""
311+
warnings.warn("copy_with_new_sdk_key is deprecated and will be removed in a future version", DeprecationWarning)
308312
return Config(
309313
sdk_key=new_sdk_key,
310314
base_uri=self.__base_uri,
@@ -333,12 +337,6 @@ def copy_with_new_sdk_key(self, new_sdk_key: str) -> 'Config':
333337
wrapper_version=self.__wrapper_version,
334338
http=self.__http,
335339
big_segments=self.__big_segments,
336-
application=self.__application,
337-
hooks=self.__hooks,
338-
plugins=self.__plugins,
339-
enable_event_compression=self.__enable_event_compression,
340-
omit_anonymous_contexts=self.__omit_anonymous_contexts,
341-
payload_filter_key=self.__payload_filter_key,
342340
)
343341

344342
# for internal use only - probably should be part of the client logic

0 commit comments

Comments
 (0)