Change log
All notable changes to the LaunchDarkly Python SDK will be documented in this file. This project adheres to Semantic Versioning.
9.21.0 (2026-11-12)
Features
- Add experimental support for flag overrides, read from local JSON or YAML files or supplied by a custom override source (6e05c04)
- Mark evaluations that a flag override affected with
overrideAffected in the evaluation reason, and count them under separate summary counters (6e05c04)
Bug Fixes
- Keep FDv2 polling running after a network error (#569) (ad37b18)
- Make TestData value_for_all return its value when targeting is off (#567) (70565bb)
- Stop the components that already started when the client fails to start (6e05c04)
9.20.0 (2026-11-05)
Features
- Replace the expiringdict dependency with an internal cache (#563) (ca34aad)
Bug Fixes
- Ignore FDv2 objects with unrecognized kinds (#541) (d5eeb80)
9.19.0 (2026-11-02)
Breaking changes to the experimental async client
The async client is experimental, so these changes do not cause a major version bump. If you use AsyncLDClient with hooks or plugins, update your code:
- Remove the experimental
AsyncHook class. The async client now uses the same synchronous Hook class as the sync client. Change each AsyncHook subclass to subclass Hook, and change its async def stages to def. The stages run on the event loop, so they must not block. (#548) (2457311)
AsyncPlugin.get_hooks now returns a list of Hook instances. AsyncPlugin.register stays async. (#548) (2457311)
Features
- Accept synchronous hooks on the async client (#548) (2457311)
Bug Fixes
- Run after-evaluation hooks when an async evaluation is cancelled or raises (2457311)
9.18.4 (2026-10-26)
Bug Fixes
- Use monotonic clocks for migration latency and FDv2 stream-init timing (#539) (346e9be)
9.18.3 (2026-10-20)
Bug Fixes
9.18.2 (2026-10-12)
Bug Fixes
- Use monotonic clocks for stream-init durations and FDv2 state windows (#537) (e8501c5)
9.18.1 (2026-10-06)
Bug Fixes
- Reuse an in-flight big segment status poll instead of always querying twice (#535) (66013b5)
9.18.0 (2026-09-25)
Features
- Add retry state for RETRY-spec backoff (#522) (e734558)
- Drive repeating tasks from a delay source (9abe8cb)
- Retry indefinitely after a data source failure instead of stopping permanently in FDv1 (e17e173)
- Warn that payload filtering has no effect with FDv2 (#518) (296311f)
- Warn when the SDK is used in a forked process without postfork (#512) (75402e9)
Bug Fixes
- Add async modules to the readthedocs API reference (#513) (f40d3b2)
- Log the cached-data evaluation warning only once per client (#520) (59ce998)
- Read all items when a collection is empty (#524) (1087147)
- Repeating task wait duration is no longer reduced by a slow callback duration. (9abe8cb)
- Report a distinct User-Agent for the async client (#516) (514c467)
- Warn and use the documented default for an invalid poll interval or initial reconnect delay (e17e173)
9.17.0 (2026-08-28)
Features
- Add async big segment store manager and async Redis adapter (#462) (aa492d2)
- Add async DynamoDB persistent feature store (#490) (cb010df)
- Add async event processor (ec7c113)
- Add async event processor (#472) (ec7c113)
- Add async FDv1 polling data source and feature requester (#475) (cca37a8)
- Add async FDv1 streaming and data source status tracking (#464) (4bf7067)
- Add async FDv2 data sources (#485) (5da1515)
- Add async FDv2 data system (#486) (6a70132)
- Add async hook, plugin, and flag tracker (#463) (686a70a)
- Add async migration support (#470) (577d51e)
- Add async persistent feature store foundation and Redis adapter (f9c76ee)
- Add AsyncConfig for the async SDK client (#471) (0587a78)
- Add AsyncLDClient with FDv1 data system and public API (#480) (fd041a5)
- Add Config.with_wrapper_information (#501) (8a98583)
- Add environment ID support for hooks. (#484) (49e809f)
- Add read-only store views and async persistence foundation for the data system (#503) (0eb61fa)
Bug Fixes
- Allow tombstones without a key property (#502) (5f44e61)
- Escape attribute names reported in redactedAttributes (#505) (90059cb)
- Prevent a persistent-store outage from throwing in the sync FDv2 evaluation (#506) (467da53)
- Return empty prerequisites for a flag that fails to evaluate in all_flags_state (#483) (73e9b07)
9.16.1 (2026-07-24)
Bug Fixes
- Bump python-eventsource to 1.7.1 to correct pool ownership when closing connections (25c2b8d)
- Correct data source error reporting (25c2b8d)
- Remove dead BUILTINS constant (#461) (eb0ecfd)
Documentation
- clarify is_initialized() semantics (SDK-2641) (#454) (bab14db)
9.16.0 (2026-06-08)
Features
- Drop persistent-store cache after FDv2 in-memory store init (#426) (563b87a)
Bug Fixes
- align FDv2 goodbye event with spec (reason-only) (#422) (84b442d)
- honor server-directed FDv1 Fallback Directive in initializer phase (#423) (7c49bc0)
- Keep booleans and numbers distinct in the in operator (#433) (da595ab)
- Replace Python 2-style ABC patterns with Python 3 equivalents (22b8fe5)
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) (ba2490d)
- Update missing version number change (#238) (7efedc8)
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.