Skip to content

Commit e471ccc

Browse files
authored
fix: Mark copy_with_new_sdk_key method as deprecated (#353)
1 parent 5dc4f81 commit e471ccc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ldclient/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Note that the same class can also be imported from the ``ldclient.client`` submodule.
55
"""
66

7+
import warnings
78
from dataclasses import dataclass
89
from threading import Event
910
from typing import Callable, List, Optional, Protocol, Set, TypeVar
@@ -357,8 +358,11 @@ def copy_with_new_sdk_key(self, new_sdk_key: str) -> 'Config':
357358
"""Returns a new ``Config`` instance that is the same as this one, except for having a different SDK key.
358359
The key will not be updated if the provided key contains invalid characters.
359360
361+
DEPRECATED: This method is deprecated and will be removed in a future version.
362+
360363
:param new_sdk_key: the new SDK key
361364
"""
365+
warnings.warn("copy_with_new_sdk_key is deprecated and will be removed in a future version", DeprecationWarning, stacklevel=2)
362366
return Config(
363367
sdk_key=new_sdk_key,
364368
base_uri=self.__base_uri,

0 commit comments

Comments
 (0)