Skip to content

Releases: launchdarkly/python-server-sdk

7.0.1

26 Nov 00:01

Choose a tag to compare

[7.0.1] - 2020-11-25

Fixed:

  • The logic for detecting uWSGI did not account for undocumented behavior in some environments where the uwsgi module is present in an incomplete state; this could cause an error on startup in such environments. Also, the log message about threading options related to uWSGI contained a broken link. (Thanks, andrefreitas!)

7.0.0

28 Oct 18:57

Choose a tag to compare

[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 the sdk_key from the Config and specify it separately when initializing the SDK. Now, it is always in the Config.

Removed:

  • Removed ldclient.set_sdk_key(). The correct way to do this now, if you are using the singleton client method ldclient.get(), is to call ldclient.set_config() with a Config object that contains the SDK key.
  • Removed the optional SDK key parameter from the LDClient constructor. You must now provide a configuration parameter of type Config, and set the SDK key within the Config 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 the Config object—LDClient("my-sdk-key")—although this would cause a deprecation warning to be logged; specifying both a key and a Config was always an error.
  • Removed the individual HTTP-related parameters such as connect_timeout from the Config type. The correct way to set these now is with the HTTPConfig 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.

6.13.2

21 Sep 23:46

Choose a tag to compare

[6.13.2] - 2020-09-21

Fixed:

  • The SDK was not recognizing proxy authorization parameters included in a proxy URL (example: http://username:password@proxyhost:port). It will now use these parameters if present, regardless of whether you set the proxy URL programmatically or in an environment variable. (Thanks, gangeli!)

6.13.1

13 Jul 18:46

Choose a tag to compare

[6.13.1] - 2020-07-13

Fixed:

  • A problem with the SDK's use of urllib3.Retry could prevent analytics event delivery from being retried after a network error or server error. (#143)

6.13.0

30 Mar 23:31

Choose a tag to compare

[6.13.0] - 2020-03-30

Added:

  • The new Config parameter initial_reconnect_delay allows customizing of the base retry delay for stream connections (that is, the delay for the first reconnection after a failure; subsequent retries use an exponential backoff).
  • The new Config parameter http and the HTTPConfig class allow advanced configuration of the SDK's network behavior, such as specifying a custom certificate authority for connecting to a proxy/gateway that uses a self-signed certificate.

Changed:

  • The retry delay for stream connections has been changed as follows: it uses an exponential backoff no matter what type of error occurred (previously, some kinds of errors had a hard-coded 1-second delay), and each delay is reduced by a random jitter of 0-50% rather than 0-100%. Also, if a connection remains active for at least 60 seconds, the backoff is reset to the initial value. This makes the Python SDK's behavior consistent with other LaunchDarkly SDKs.

Deprecated:

  • The existing Config properties connect_timeout, read_timeout, and verify_ssl are now deprecated and superseded by the equivalent properties in HTTPConfig.

6.12.2

20 Mar 00:15

Choose a tag to compare

[6.12.2] - 2020-03-19

Fixed:

  • Setting verify_ssl to False in the client configuration did not have the expected effect of completely turning off SSL/TLS verification, because it still left certificate verification in effect, so it would allow a totally insecure connection but reject a secure connection whose certificate had an unknown CA. This has been changed so that it will turn off certificate verification as well. This is not a recommended practice and a future version of the SDK will add a way to specify a custom certificate authority instead (to support, for instance, using the Relay Proxy with a self-signed certificate).

6.12.1

12 Feb 21:15

Choose a tag to compare

[6.12.1] - 2020-02-12

Fixed:

  • When diagnostic events are enabled (as they are by default), the SDK was logging spurious warning messages saying "Unhandled exception in event processor. Diagnostic event was not sent. ['DiagnosticEventSendTask' object has no attribute '_response_fn']". The events were still being sent; the misleading message has been removed.

6.12.0

11 Feb 22:10

Choose a tag to compare

[6.12.0] - 2020-02-11

Note: if you are using the LaunchDarkly Relay Proxy to forward events, update the Relay to version 5.10.0 or later before updating to this Python SDK version.

Added:

  • The SDK now periodically sends diagnostic data to LaunchDarkly, describing the version and configuration of the SDK, the architecture and version of the runtime platform, and performance statistics. No credentials, hostnames, or other identifiable values are included. This behavior can be disabled with the diagnostic_opt_out option or configured with diagnostic_recording_interval.

Fixed:

  • The SDK now specifies a uniquely identifiable request header when sending events to LaunchDarkly to ensure that events are only processed once, even if the SDK sends them two times due to a failed initial attempt.

6.11.3

30 Dec 21:15

Choose a tag to compare

[6.11.3] - 2019-12-30

Fixed:

  • In rare circumstances (depending on the exact data in the flag configuration, the flag's salt value, and the user properties), a percentage rollout could fail and return a default value, logging the error "variation/rollout object with no variation or rollout". This would happen if the user's hashed value fell exactly at the end of the last "bucket" (the last variation defined in the rollout). This has been fixed so that the user will get the last variation.

6.11.2

10 Dec 00:10

Choose a tag to compare

[6.11.2] - 2019-12-09

Fixed:

  • Changed Files.new_data_source() to use yaml.safe_load() instead of yaml.load() for YAML/JSON test data parsing. This disables pyyaml extended syntax features that could allow arbitrary code execution. (#136)