Skip to content

Commit fb544cd

Browse files
authored
(U2C 4) remove deprecated things (#192)
1 parent 8f9c22a commit fb544cd

File tree

12 files changed

+8
-310
lines changed

12 files changed

+8
-310
lines changed

docs/api-deprecated.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ For more information, see LaunchDarkly's `Quickstart <https://docs.launchdarkly.
2020
api-integrations
2121
api-extending
2222
api-testing
23-
api-deprecated

ldclient/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def variation(self, key: str, user: dict, default: Any) -> Any:
253253
def variation_detail(self, key: str, user: dict, default: Any) -> EvaluationDetail:
254254
"""Determines the variation of a feature flag for a user, like :func:`variation()`, but also
255255
provides additional information about how this value was calculated, in the form of an
256-
:class:`ldclient.flag.EvaluationDetail` object.
256+
:class:`ldclient.evaluation.EvaluationDetail` object.
257257
258258
Calling this method also causes the "reason" data to be included in analytics events,
259259
if you are capturing detailed event data for this flag.

ldclient/flag.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

ldclient/flags_state.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

ldclient/impl/evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from typing import Callable, Optional, Tuple
1010

1111
# For consistency with past logging behavior, we are pretending that the evaluation logic still lives in
12-
# the ldclient.flag module.
12+
# the ldclient.evaluation module.
1313
log = logging.getLogger('ldclient.flag')
1414

1515
__LONG_SCALE__ = float(0xFFFFFFFFFFFFFFF)

ldclient/integrations/__init__.py

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -161,24 +161,12 @@ def new_feature_store(url: str='redis://localhost:6379/0',
161161
:param url: the URL of the Redis host; defaults to ``DEFAULT_URL``
162162
:param prefix: a namespace prefix to be prepended to all Redis keys; defaults to
163163
``DEFAULT_PREFIX``
164-
:param max_connections: the maximum number of Redis connections to keep in the
165-
connection pool; defaults to ``DEFAULT_MAX_CONNECTIONS``. This
166-
parameter will later be dropped in favor of setting
167-
redis_opts['max_connections']
168164
:param caching: specifies whether local caching should be enabled and if so,
169165
sets the cache properties; defaults to :func:`ldclient.feature_store.CacheConfig.default()`
170166
:param redis_opts: extra options for initializing Redis connection from the url,
171-
see `redis.connection.ConnectionPool.from_url` for more details. Note that
172-
if you set max_connections, this will take precedence over the
173-
deprecated max_connections parameter.
167+
see `redis.connection.ConnectionPool.from_url` for more details.
174168
"""
175169

176-
# WARN(deprecated): Remove the max_connection parameter from
177-
# this signature and clean up this bit of code.
178-
if 'max_connections' not in redis_opts:
179-
redis_opts = redis_opts.copy()
180-
redis_opts['max_connections'] = max_connections
181-
182170
core = _RedisFeatureStoreCore(url, prefix, redis_opts)
183171
wrapper = CachingStoreWrapper(core, caching)
184172
wrapper._core = core # exposed for testing
@@ -208,22 +196,10 @@ def new_big_segment_store(url: str='redis://localhost:6379/0',
208196
:param url: the URL of the Redis host; defaults to ``DEFAULT_URL``
209197
:param prefix: a namespace prefix to be prepended to all Redis keys; defaults to
210198
``DEFAULT_PREFIX``
211-
:param max_connections: the maximum number of Redis connections to keep in the
212-
connection pool; defaults to ``DEFAULT_MAX_CONNECTIONS``. This
213-
parameter will later be dropped in favor of setting
214-
redis_opts['max_connections']
215199
:param redis_opts: extra options for initializing Redis connection from the url,
216-
see `redis.connection.ConnectionPool.from_url` for more details. Note that
217-
if you set max_connections, this will take precedence over the
218-
deprecated max_connections parameter.
200+
see `redis.connection.ConnectionPool.from_url` for more details.
219201
"""
220202

221-
# WARN(deprecated): Remove the max_connection parameter from
222-
# this signature and clean up this bit of code.
223-
if 'max_connections' not in redis_opts:
224-
redis_opts = redis_opts.copy()
225-
redis_opts['max_connections'] = max_connections
226-
227203
return _RedisBigSegmentStore(url, prefix, redis_opts)
228204

229205
class Files:

ldclient/interfaces.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def available(self) -> bool:
341341
342342
If this property is False, the store is not able to make queries (for instance, it may not have
343343
a valid database connection). In this case, the SDK will treat any reference to a Big Segment
344-
as if no users are included in that segment. Also, the :func:`ldclient.flag.EvaluationDetail.reason`
344+
as if no users are included in that segment. Also, the :func:`ldclient.evaluation.EvaluationDetail.reason`
345345
associated with with any flag evaluation that references a Big Segment when the store is not
346346
available will have a `bigSegmentsStatus` of `"STORE_ERROR"`.
347347
"""
@@ -356,7 +356,7 @@ def stale(self) -> bool:
356356
This may indicate that the LaunchDarkly Relay Proxy, which populates the store, has stopped
357357
running or has become unable to receive fresh data from LaunchDarkly. Any feature flag
358358
evaluations that reference a Big Segment will be using the last known data, which may be out
359-
of date. Also, the :func:`ldclient.flag.EvaluationDetail.reason` associated with those evaluations
359+
of date. Also, the :func:`ldclient.evaluation.EvaluationDetail.reason` associated with those evaluations
360360
will have a `bigSegmentsStatus` of `"STALE"`.
361361
"""
362362
return self.__stale

ldclient/repeating_timer.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

ldclient/sse_client.py

Lines changed: 0 additions & 213 deletions
This file was deleted.

0 commit comments

Comments
 (0)