Skip to content

Commit 948dcbc

Browse files
committed
Deprecate DSELoadBalancingPolicy
1 parent 128bb08 commit 948dcbc

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

CHANGELOG.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
======
33
Unreleased
44

5+
Features
6+
--------
7+
8+
Bug Fixes
9+
---------
10+
11+
Others
12+
------
13+
14+
Deprecations
15+
------------
16+
17+
* DSELoadBalancingPolicy will be removed in the next major, consider using
18+
the DefaultLoadBalancingPolicy.
19+
520
Merged from dse-driver:
621

722
Features

cassandra/policies.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,15 @@ def make_query_plan(self, working_keyspace=None, query=None):
11631163

11641164

11651165
# TODO for backward compatibility, remove in next major
1166-
DSELoadBalancingPolicy = DefaultLoadBalancingPolicy
1166+
class DSELoadBalancingPolicy(DefaultLoadBalancingPolicy):
1167+
"""
1168+
*Deprecated:* This will be removed in the next major release,
1169+
consider using :class:`.DefaultLoadBalancingPolicy`.
1170+
"""
1171+
def __init__(self, *args):
1172+
super(DSELoadBalancingPolicy, self).__init__(*args)
1173+
warnings.warn("DSELoadBalancingPolicy will be removed in 4.0. Consider using "
1174+
"DefaultLoadBalancingPolicy.", DeprecationWarning)
11671175

11681176

11691177
class NeverRetryPolicy(RetryPolicy):

0 commit comments

Comments
 (0)