All notable changes to the LaunchDarkly Python SDK will be documented in this file. This project adheres to Semantic Versioning.
- Fixed a bug that, in Python 3.x, caused an error when using an integer user attribute to compute a rollout.
- Fixed a bug that, in Python 3.x, made the
all_flags
method return a dictionary with byte-string keys instead of string keys when using the Redis feature store.
- In the Redis feature store, fixed a synchronization problem that could cause a feature flag update to be missed if several of them happened in rapid succession.
- Support for a new LaunchDarkly feature: reusable user segments.
- The
FeatureStore
interface has been changed to support user segment data as well as feature flags. Existing code that usesInMemoryFeatureStore
orRedisFeatureStore
should work as before, but custom feature store implementations will need to be updated.
- Twisted is no longer supported.
This release was broken and has been removed.
- Percentage rollouts can now reference an attribute with an integer value, not just string attributes.
- Fixed a bug that caused unusually slow initialization times when there are large numbers of flags.
- Fixed reporting of events for prerequisite checks.
- Reduced WARN-level logging for a feature flag not being found to INFO level.
- Fixed a bug where a previously deleted feature flag might be considered still available.
- The private attributes feature added in v4.1.0 was not available in Twisted mode; now it is.
- Will use feature store if already initialized even if connection to service could not be established. This is useful when flags have been initialized in redis.
- Allow user to stop user attributes from being sent in analytics events back to LaunchDarkly. Set
private_attribute_names
on each request and/or onConfig
to a list of strings matching the names of the attributes you wish to exclude. Setall_attributes_private
on theConfig
object to hide all attributes.
- Stop reattempting connections when receiving a 401 (unauthorized) response from LaunchDarkly. This should only be caused by invalid SDK key so retrying is pointless.
events_enabled
is deprecated andsend_events
should be used instead.events_enabled
may be removed in a future minor revision.
- Improved error handling when processing stream events
- Replaced 3rd party rfc3339 library for license compliance
- No longer caching
get_one()
responses
- #70 Regex
matches
targeting rules now include the user if a match is found anywhere in the attribute. Before fixing this bug, the beginning of the attribute needed to match the pattern.
- #43 Started publishing code coverage metrics to Code Climate. Bear in mind that the Code Climate coverage report only shows the unit test coverage, while the bulk of our SDK test coverage comes from a separate integration test suite.
- #65 Ensure that no warning is logged about a missing SDK key when the
ldclient
package is imported.
- Fixed missing python2.6-requirements.txt in manifest
- Support for Python 2.6.
- RedisFeatureStore now returns default when Redis errors occur
- Better detection of stream connection issues.
- Changing the config and SDK key is now supported after initialization. The client will be restarted with the new configuration
- Breaking api change:
ldclient.sdk_key = <KEY>
replaced with:ldclient.set_sdk_key('<KEY>')
- Breaking api change:
ldclient.config = config
replaced with:ldclient.set_config(config)
- No longer depend on sseclient library, instead include our own sse client
- Add backoff when retrying stream connection.
- More correct initialized state.
- Better error handling when sending events.
- Now using jsonpickle to serialize analytics events. Addresses launchdarkly#57
- Better handling of indirect/put and indirect/patch messages in streaming connection.
- Twisted support for LDD mode only.
- FeatureStore interface get() and all() methods now take an additional callback parameter.
- Support for multivariate feature flags.
variation
replacestoggle
and can return a string, number, dict, or boolean value depending on how the flag is defined. - New
all_flags
method returns all flag values for a specified user. - New
secure_mode_hash
function computes a hash suitable for the new LaunchDarkly JavaScript client's secure mode feature.
- The
toggle
call has been deprecated in favor ofvariation
.
- Twisted support has temporarily been removed.