Skip to content

Commit 8512f4f

Browse files
author
LaunchDarklyReleaseBot
committed
Releasing version 8.0.0
1 parent 1d9769b commit 8512f4f

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,39 @@
22

33
All notable changes to the LaunchDarkly Python SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [8.0.0] - 2022-12-30
6+
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."
7+
8+
This feature is only available to members of LaunchDarkly's Early Access Program (EAP). If you're in the EAP, you can use contexts by updating your SDK to the latest version and, if applicable, updating your Relay Proxy. Outdated SDK versions do not support contexts, and will cause unpredictable flag evaluation behavior.
9+
10+
If you are not in the EAP, only use single contexts of kind "user", or continue to use the user type if available. If you try to create contexts, the context will be sent to LaunchDarkly, but any data not related to the user object will be ignored.
11+
12+
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](https://docs.launchdarkly.com/sdk/server-side/python/migration-7-to-8).
13+
14+
### Added:
15+
- In `ldclient`, the `Context` type defines the new context model.
16+
- 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.
17+
- 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".
18+
19+
### Changed _(breaking changes from 7.x)_:
20+
- 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.
21+
- 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.
22+
- 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.
23+
24+
### Changed (requirements/dependencies/build):
25+
- The minimum Python version is now 3.7.
26+
27+
### Changed (behavioral changes):
28+
- The SDK can now evaluate segments that have rules referencing other segments.
29+
- Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.
30+
- 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.
31+
32+
### Removed:
33+
- Removed all types, properties, and methods that were deprecated as of the most recent 5.x release.
34+
- 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`.
35+
- The `alias` method no longer exists because alias events are not needed in the new context model.
36+
- The `inline_users_in_events` option no longer exists because it is not relevant in the new context model.
37+
538
## [7.5.1] - 2022-09-29
639
### Added:
740
- Publishing this package now includes a pre-built wheel distribution in addition to the customary source distribution.

ldclient/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "7.5.1"
1+
VERSION = "8.0.0"

0 commit comments

Comments
 (0)