Skip to content

Commit

Permalink
Releasing version 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LaunchDarklyReleaseBot committed Dec 30, 2022
1 parent 1d9769b commit 8512f4f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@

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

## [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."

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.

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.

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).

### 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.
Expand Down
2 changes: 1 addition & 1 deletion ldclient/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "7.5.1"
VERSION = "8.0.0"

0 comments on commit 8512f4f

Please sign in to comment.