@@ -4,6 +4,82 @@ Upgrading
4
4
.. toctree ::
5
5
:maxdepth: 1
6
6
7
+ Upgrading from dse-driver
8
+ -------------------------
9
+
10
+ Since 3.21.0, cassandra-driver fully supports DataStax products. dse-driver and
11
+ dse-graph users should now migrate to cassandra-driver to benefit from latest bug fixes
12
+ and new features. The upgrade to this new unified driver version is straightforward
13
+ with no major API changes.
14
+
15
+ Installation
16
+ ^^^^^^^^^^^^
17
+
18
+ Only the `cassandra-driver ` package should be installed. `dse-driver ` and `dse-graph `
19
+ are not required anymore::
20
+
21
+ pip install cassandra-driver
22
+
23
+ If you need the Graph *Fluent * API (features provided by dse-graph)::
24
+
25
+ pip install cassandra-driver[graph]
26
+
27
+ See :doc: `installation ` for more details.
28
+
29
+ Import from the cassandra module
30
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
+
32
+ There is no `dse ` module, so you should import from the `cassandra ` module. You
33
+ need to change only the first module of your import statements, not the submodules.
34
+
35
+ .. code-block :: python
36
+
37
+ from dse.cluster import Cluster, EXEC_PROFILE_GRAPH_DEFAULT
38
+ from dse.auth import PlainTextAuthProvider
39
+ from dse.policies import WhiteListRoundRobinPolicy
40
+
41
+ # becomes
42
+
43
+ from cassandra.cluster import Cluster, EXEC_PROFILE_GRAPH_DEFAULT
44
+ from cassandra.auth import PlainTextAuthProvider
45
+ from cassandra.policies import WhiteListRoundRobinPolicy
46
+
47
+ dse-graph
48
+ ^^^^^^^^^
49
+
50
+ dse-graph features are now built-in in cassandra-driver. The only change you need
51
+ to do is your import statements:
52
+
53
+ .. code-block :: python
54
+
55
+ from dse_graph import ..
56
+ from dse_graph.query import ..
57
+
58
+ # becomes
59
+
60
+ from cassandra.datastax.graph.fluent import ..
61
+ from cassandra.datastax.graph.fluent.query import ..
62
+
63
+ See :mod: `~.datastax.graph.fluent `.
64
+
65
+ Session.execute and Session.execute_async API
66
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
+
68
+ Although it is not common to use this API with positional arguments, it is
69
+ important to be aware that the `host ` and `execute_as ` parameters have had
70
+ their positional order swapped. This is only because `execute_as ` was added
71
+ in dse-driver before `host `.
72
+
73
+ See :meth: `.Session.execute `.
74
+
75
+ Deprecations
76
+ ^^^^^^^^^^^^
77
+
78
+ These changes are optional, but recommended:
79
+
80
+ * Importing from `cassandra.graph ` is deprecated. Consider importing from `cassandra.datastax.graph `.
81
+ * Use :class: `~.policies.DefaultLoadBalancingPolicy ` instead of DSELoadBalancingPolicy.
82
+
7
83
Upgrading to 3.0
8
84
----------------
9
85
Version 3.0 of the DataStax Python driver for Apache Cassandra
@@ -46,7 +122,7 @@ materialize a list using the iterator:
46
122
results = session.execute(" SELECT * FROM system.local" )
47
123
row_list = list (results)
48
124
49
- For backward compatability , :class: `~.ResultSet ` supports indexing. When
125
+ For backward compatibility , :class: `~.ResultSet ` supports indexing. When
50
126
accessed at an index, a `~.ResultSet ` object will materialize all its pages:
51
127
52
128
.. code-block :: python
0 commit comments