|
6 | 6 |
|
7 | 7 | from threading import Event |
8 | 8 | from typing import Callable, List, Optional, Set |
| 9 | +import warnings |
9 | 10 |
|
10 | 11 | from ldclient.feature_store import InMemoryFeatureStore |
11 | 12 | from ldclient.hook import Hook |
@@ -303,8 +304,11 @@ def __init__( |
303 | 304 | def copy_with_new_sdk_key(self, new_sdk_key: str) -> 'Config': |
304 | 305 | """Returns a new ``Config`` instance that is the same as this one, except for having a different SDK key. |
305 | 306 |
|
| 307 | + DEPRECATED: This method is deprecated and will be removed in a future version. |
| 308 | +
|
306 | 309 | :param new_sdk_key: the new SDK key |
307 | 310 | """ |
| 311 | + warnings.warn("copy_with_new_sdk_key is deprecated and will be removed in a future version", DeprecationWarning) |
308 | 312 | return Config( |
309 | 313 | sdk_key=new_sdk_key, |
310 | 314 | base_uri=self.__base_uri, |
@@ -333,12 +337,6 @@ def copy_with_new_sdk_key(self, new_sdk_key: str) -> 'Config': |
333 | 337 | wrapper_version=self.__wrapper_version, |
334 | 338 | http=self.__http, |
335 | 339 | 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, |
342 | 340 | ) |
343 | 341 |
|
344 | 342 | # for internal use only - probably should be part of the client logic |
|
0 commit comments