[7.0.0] - 2020-10-28
This major release is for Python compatibility updates and removal of deprecated APIs. It introduces no new functionality except type hints.
Added:
- Added type hints to all SDK methods. Python by itself does not enforce these, but commonly used development tools can provide static checking to trigger warnings or errors if the wrong type is used.
Changed:
- Python 2.7, 3.3, and 3.4 are no longer supported. The minimum Python version is now 3.5.
- The first parameter to the
Config
constructor,sdk_key
, is now required. Previously it was possible to omit thesdk_key
from theConfig
and specify it separately when initializing the SDK. Now, it is always in theConfig
.
Removed:
- Removed
ldclient.set_sdk_key()
. The correct way to do this now, if you are using the singleton client methodldclient.get()
, is to callldclient.set_config()
with aConfig
object that contains the SDK key. - Removed the optional SDK key parameter from the
LDClient
constructor. You must now provide a configuration parameter of typeConfig
, and set the SDK key within theConfig
constructor:LDClient(Config(sdk_key = "my-sdk-key", [any other config options]))
. Previously, it was possible to specify the SDK key as a single string parameter and omit theConfig
object—LDClient("my-sdk-key")
—although this would cause a deprecation warning to be logged; specifying both a key and aConfig
was always an error. - Removed the individual HTTP-related parameters such as
connect_timeout
from theConfig
type. The correct way to set these now is with theHTTPConfig
sub-configuration object:Config(sdk_key = "my-sdk-key", http = HTTPConfig(connect_timeout = 10))
. - Removed all other types, parameters, and methods that were deprecated as of the last 6.x release.