Change log
All notable changes to the LaunchDarkly Python SDK will be documented in this file. This project adheres to Semantic Versioning.
9.15.1 (2026-04-10)
Bug Fixes
- Improve fallback behavior when using custom data system configuration (#407) (60272b2)
9.15.0 (2026-02-10)
⚠ BREAKING CHANGES
Note: The following breaking changes apply only to FDv2 (Flag Delivery v2) early access features, which are not subject to semantic versioning and may change without a major version bump.
- Update ChangeSet to always require a Selector (#405) (5dc4f81)
- The
ChangeSetBuilder.finish() method now requires a Selector parameter.
- Update DataSystemConfig to accept list of synchronizers (#404) (c73ad14)
- The
DataSystemConfig.synchronizers field now accepts a list of synchronizers, and the ConfigBuilder.synchronizers() method accepts variadic arguments.
Features
Bug Fixes
- Add context manager for clearer, safer locks (#396) (beca0fa)
- Address potential race condition in FeatureStore update_availability (#391) (31cf487)
- Allow modifying fdv2 data source options independent of main config (#403) (d78079e)
- Mark copy_with_new_sdk_key method as deprecated (#353) (e471ccc)
- Prevent immediate polling on recoverable error (#399) (da565a2)
- Redis store is considered initialized when
$inited key is written (e99a27d)
- Stop FeatureStoreClientWrapper poller on close (#397) (468afdf)
- Update reason documentation with inExperiment value (#401) (cbfc3dd)
- Update Redis to write missing
$inited key (e99a27d)
9.14.1 (2025-12-15)
Bug Fixes
- Remove all synchronizers in daemon mode (#388) (441a5ec)
9.14.0 (2025-12-04)
Features
- adding data system option to create file datasource intializer (e5b121f)
- adding file data source as an intializer (#381) (3700d1d)
Bug Fixes
- Add warning if relying on Redis
max_connections parameter (#387) (e6395fa), closes #386
- modified initializer behavior to spec (064f65c)
9.13.1 (2025-11-19)
Bug Fixes
9.13.0 (2025-11-19)
Features
- experimental: Release EAP support for FDv2 data system (#376) (0e7c32b)
9.12.3 (2025-10-30)
Bug Fixes
- Fix overly generic type hint on File data source (#365) (52a7499), closes #364
9.12.2 (2025-10-27)
Bug Fixes
- Fix incorrect event count in failure message (#359) (91f4163)
9.12.1 (2025-09-30)
Bug Fixes
- Add validation format check for SDK key (#351)
9.12.0 (2025-07-11)
⚠ BREAKING CHANGES
- Drop support for Python 3.8 (eol 2024-10-07) (#339)
Features
9.11.1 (2025-05-29)
Bug Fixes
- Raise minimum eventsource dep to v1.2.4 (#333) (5270962)
9.11.0 (2025-04-08)
Features
- Add
postfork method to re-initialize after forking (#329) (581fcfb)
9.10.0 (2025-03-13)
Features
- Inline context for custom and migration op events (#327) (ecfd56c)
9.9.0 (2025-01-03)
Features
9.8.1 (2024-12-23)
Bug Fixes
9.8.0 (2024-10-16)
Features
- Add support for client-side prerequisite events (#314) (3025af4)
9.7.2 (2024-10-01)
Bug Fixes
- Set explicit names for each spawned thread (#311) (9c7777c)
- Shutdown diagnostic thread if enabled (#312) (cde6cfb)
9.7.1 (2024-08-26)
Bug Fixes
- Skip empty hosts when processing NO_PROXY variable (#309) (82d8117)
9.7.0 (2024-08-20)
Features
- Add option to omit anonymous users from index and identify events (#306) (8f13ffe)
9.6.0 (2024-08-19)
Features
NO_PROXY environment variable can be used to override HTTP(S)_PROXY values (#301) (d0913ee)
9.5.0 (2024-07-25)
This release introduces the ability to enable compression of event payloads. When enabled, the SDK will compress events before sending them to the LaunchDarkly servers. This can reduce the bandwidth required to send events, which can be useful in high-traffic environments to reduce egress traffic costs.
[!IMPORTANT]
Relay Proxy users MUST upgrade to version 8.9 or higher prior to enabling this option to prevent loss of event data.
However, enabling this feature is NOT required when using the Relay Proxy as it will manage compression automatically.
Features
- Add option to enable event payload compression (#300) (87c56c9)
Bug Fixes
- Log warning if client init timeout is considered high (#295) (08514fe)
Documentation
9.4.0 (2024-04-29)
Features
9.3.1 (2024-04-04)
Bug Fixes
9.3.0 (2024-03-14)
Features
- Inline contexts for all evaluation events (#245) (8b5429b)
- Redact anonymous attributes within feature events (#246) (4022ee2)
9.2.2 (2024-03-07)
Bug Fixes
- Correct typehint on Config.update_processor_class (#274) (d386f9c), closes #273
9.2.1 (2024-03-01)
Bug Fixes
Documentation
- Add example output for PROVENANCE.md #268 (43cf5bf)
- Fix version generation in PROVENANCE file (#272) (7dd887e)
9.2.0 (2024-02-14)
Features
- Enable gzip Accept-Encoding header on polling requests (2c2e4fa)
Bug Fixes
- deps: Update flask requirement from 2.2.5 to 3.0.0 (#250) (b3cc0fa)
- deps: Update flask requirement from 3.0.0 to <4 (#254) (dc5a6ba)
- deps: Update jinja2 requirement from 3.0.0 to 3.1.2 (77a1f76)
- deps: Update jinja2 requirement from 3.1.2 to 3.1.3 (#252) (495604b)
- deps: Update mypy requirement from ==0.910 to ==1.8.0 (#251) (cea865e)
- deps: Update pytest-mypy requirement from ==0.8.1 to ==0.10.3 (#249) (f2e2e17)
- deps: Update sphinx requirement from ^1.3.0 to ^6.0.0 (77a1f76)
- deps: Update sphinx requirement from ^6.0.0 to >=6,<8 (#255) (d4eb5af)
- deps: Update sphinx-rtd-theme requirement from ^1.3.0 to >=1.3,<3.0 (#253) ()
9.1.0 (2023-12-20)
Features
- Add data source status provider support (#228) (f733d07)
- Add support for data store status monitoring (#252) (57ca6ac)
- Introduce flag change tracker api (#229) (4df1762)
- Replace internal es implementation with launchdarkly-eventsource package (#254) (99aafd5)
Bug Fixes
- deps: Bump jsonpickle to fix CVE-2020-22083 (#234) (6280fe8)
- deps: Bump pyyaml to fix CVE-2020-1747 (#236) (48291ec)
- Fix data store availability status check (#237) (81e2910)
[9.0.1] - 2023-10-27
Fixed:
- Replace deprecated
utcfromtimestamp usage.
[8.2.1] - 2023-10-23
Fixed:
- Replace deprecated
utcfromtimestamp usage.
[9.0.0] - 2023-10-17
The latest version of this SDK supports the ability to manage migrations or modernizations, using migration flags. You might use this functionality if you are optimizing queries, upgrading to new tech stacks, migrating from one database to another, or other similar technology changes. Migration flags are part of LaunchDarkly's Early Access Program. This feature is available to all LaunchDarkly customers but may undergo additional changes before it is finalized.
For detailed information about this version, refer to the list below. For information on how to upgrade from the previous version, read the migration guide.
Added:
- A new
Migrator type which provides an out-of-the-box configurable migration framework.
- For more advanced use cases, added new
migration_variation and track_migration_op methods on LDClient.
Changed:
- Raised
pyyaml dependency to >=5.3.
Removed:
- Python 3.7 support was removed.
- The legacy user format for contexts is no longer supported. To learn more, read the Contexts documentation.
- Methods which originally took a
Context or a dict now only accept a Context.
- Previously deprecated config options
user_cache_size, user_cache_time, user_keys_capacity, user_keys_flush_interval, and private_attribute_names have been removed.
- Previously deprecated test data flag builder method
variation_for_all_users has been removed.
[8.2.0] - 2023-10-17
Deprecated:
- Creating an
LDContext using the legacy user format has been deprecated and will be removed in the next major release. To learn more, read the Contexts documentation.
- Providing client methods
track, identify, variation, variation_detail, all_flags_state, and secure_mode_hash with a context dictionary is deprecated. In the next major release, a Context will be required.
[8.1.7] - 2023-10-05
Changed:
- Loosened urllib3 requirement to <3
[8.1.6] - 2023-09-06
Changed:
- Recoverable errors are logged as a warning not an error. (Thanks, fritzdj!)
[8.1.5] - 2023-08-15
Changed:
- Loosened the requirements on the semver package. (Thanks, hauntsaninja!)
[8.1.4] - 2023-06-01
Fixed:
- Password will be redacted from redis URL prior to logging.
[8.1.3] - 2023-05-03
Fixed:
- Updated usage of
HTTPResponse.getheader to remove deprecation warning from upstream urllib3 package. (Thanks, mnito!)
[8.1.2] - 2023-05-01
Fixed:
- Pinned urllib3 dependency to <2. (Thanks, prpnmac!)
[8.1.1] - 2023-02-10
Fixed:
- Fixed indexing error raised by calling
all_flags_state while using the TestData data source.
[7.6.1] - 2023-02-07
Fixed:
- Fixed indexing error raised by calling
all_flags_state while using the TestData data source.
[8.1.0] - 2023-01-31
Added:
- Introduced support for an
application config property which sets application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.
[7.6.0] - 2023-01-31
Added:
- Introduced support for an
application config property which sets application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.
[8.0.0] - 2022-12-30
The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."
For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.
Added:
- In
ldclient, the Context type defines the new context model.
- For all SDK methods that took a user parameter in the form of a
dict, you can now pass a Context instead. You can still pass a dict containing user properties, in which case the SDK will convert it to a Context transparently; however, Context is preferable if you value efficiency since there is some overhead to this conversion.
- The
TestData flag builder methods have been extended to support now context-related options, such as matching a key for a specific context type other than "user".
Changed (breaking changes from 7.x):
- It was previously allowable to set a user key to an empty string. In the new context model, the key is not allowed to be empty. Trying to use an empty key will cause evaluations to fail and return the default value.
- There is no longer such a thing as a
secondary meta-attribute that affects percentage rollouts. If you set an attribute with that name in a Context, it will simply be a custom attribute like any other.
- The
anonymous attribute is now a simple boolean, with no distinction between a false state and a null/undefined state. Previously, a flag rule like anonymous is false would not match if the attribute was undefined, but now undefined is treated the same as false.
Changed (requirements/dependencies/build):
- The minimum Python version is now 3.7.
Changed (behavioral changes):
- The SDK can now evaluate segments that have rules referencing other segments.
- Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.
- Several optimizations within the flag evaluation logic have improved the performance of evaluations. For instance, target lists are now stored internally as sets for faster matching.
Removed:
- Removed all types, properties, and methods that were deprecated as of the most recent 5.x release.
- Removed the deprecated
ldclient.flag module. This was previously an alternate way to import the EvaluationDetail type; now, you can only import that type from ldclient.evaluation.
- The
alias method no longer exists because alias events are not needed in the new context model.
- The
inline_users_in_events option no longer exists because it is not relevant in the new context model.
[7.5.1] - 2022-09-29
Added:
- Publishing this package now includes a pre-built wheel distribution in addition to the customary source distribution.
[7.5.0] - 2022-07-01
Added:
- A new
redis_opts parameter is available when configuring a Redis feature or Big Segment store. This parameter will be passed through to the underlying redis driver, allowing for greater configurability. (Thanks, danie1k!)
Fixed:
- Our previous attempt at adding mypy type checking support missed the inclusion of the required py.typed file. (Thanks, anentropic!)
[7.4.2] - 2022-06-16
Changed:
- Removed upper version restriction on expiringdict. This was originally necessary to allow compatibility with older Python versions which are no longer supported.
[7.4.1] - 2022-04-22
Added:
Fixed:
- Fixed invalid operator in key in TestData.
- Fixed bucketing logic to not treat boolean values as bucketable value types.
[7.4.0] - 2022-02-16
Added:
TestData, in the new module ldclient.integrations.test_data, is a new way to inject feature flag data programmatically into the SDK for testing—either with fixed values for each flag, or with targets and/or rules that can return different values for different users. Unlike the file data source, this mechanism does not use any external resources, only the data that your test code has provided.
[7.3.1] - 2022-02-14
Added:
- CI builds now include a cross-platform test suite implemented in https://github.com/launchdarkly/sdk-test-harness. This covers many test cases that are also implemented in unit tests, but may be extended in the future to ensure consistent behavior across SDKs in other areas.
Fixed:
- The SDK no longer uses the deprecated method
threading.Condition.notifyAll(). (Thanks, jdmoldenhauer!)
- A rule clause that uses a date operator should be considered a non-match, rather than an error, if either value is
None.
- A rule clause that uses a semver operator should be considered a non-match, rather than an error, if either value is not a string.
- Rules targeting the
secondary attribute will now reference the correct value.
- The
identify method should not emit an event if the user key is an empty string.
- Do not include
prereqOf field in event data if it is null. This is done to save on event transfer bandwidth.
- Data from
all_flags_state was always including the flag's version even when it was unnecessary.
- Any base URIs set in
Config will work consistently whether they have trailing slashes or not.
- When using
all_flags_state to produce bootstrap data for the JavaScript SDK, the Python SDK was not returning the correct metadata for evaluations that involved an experiment. As a result, the analytics events produced by the JavaScript SDK did not correctly reflect experimentation results.
- Data from
all_flags_state was always including the flag's version even when it was unnecessary.
[7.3.0] - 2021-12-10
Added:
[7.2.1] - 2021-12-03
Changed:
- Added CI testing for Python 3.10.
Fixed:
- In streaming mode, the SDK could sometimes fail to receive flag data from LaunchDarkly if the data contained characters that are not in the Basic Latin character set. The error was intermittent and would depend on unpredictable factors of speed and network behavior which could cause the first byte of a multi-byte UTF8 character to be processed before the rest of the bytes had arrived.
- Fixed some irregularities in the SSE parsing logic used for stream data. The SDK's CI tests now include a more thorough test suite for SSE behavior that is implemented in https://github.com/launchdarkly/sse-contract-tests, to ensure that it is consistent with other LaunchDarkly SDKs.
[7.2.0] - 2021-06-17
Added:
- The SDK now supports the ability to control the proportion of traffic allocation to an experiment. This works in conjunction with a new platform feature now available to early access customers.
[7.1.0] - 2021-03-11
Added:
- Added the
alias method to LDClient. This can be used to associate two user objects for analytics purposes with an alias event.
[7.0.2] - 2021-02-18
Fixed:
- The SDK could fail to send debug events when event debugging was enabled on the LaunchDarkly dashboard, if the application server's time zone was not GMT.
[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] - 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.3] - 2021-02-23
Fixed:
- The SDK could fail to send debug events when event debugging was enabled on the LaunchDarkly dashboard, if the application server's time zone was not GMT.
[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] - 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] - 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] - 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] - 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] - 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] - 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] - 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)
[6.11.1] - 2019-11-21
Fixed:
- Fixed an incompatibility with Python 3.3 due to an unpinned dependency on
expiringdict.
- Fixed usages that caused a
SyntaxWarning in Python 3.8. (Thanks, bunchesofdonald!)
- Updated CI scripts so a
SyntaxWarning will always cause a build failure, and added a 3.8 build.
[6.11.0] - 2019-10-31
Added:
- The new
Config parameter http_proxy allows you to specify a proxy server programmatically rather than by using environment variables. This may be helpful if you want the SDK to use a proxy, but do not want other Python code to use the proxy. (Thanks, gangeli!)
[6.10.2] - 2019-10-30