Commit e0615f2
committed
PYCBC-1730: Migrate Cluster & Bucket objects away from Wrapper decorators
Motivation
==========
Two features are needed to be added to the Python client: observability
and additional protocols. While the observability feature is coming
soon and the additional protocol later, both changes requires touching
the entire surface area of the client. The changes in this migration
are aimed at preventing duplicate work by reorganizing the multiple APIs
supported by the Python client to provide more centralized logic and
make the addition of future protocols straight-forward.
Modification
============
* Add client_adapter for sync and async operations (async adapter used
by acouchbase and txcouchbase APIs)
* Add cluster and bucket impl classes for all APIs (txcouchbase utilizes
the acouchbase impl logic and converts futures/coroutines to
deferreds)
* Add BindingMap which maps all operations to the corresponding method
in the bindings
* Add cluster and bucket request builders (this is where the options
processing logic resides)
* Update transactions __init__ params to adjust to new client_adapter
* Move cluster __init__ logic to cluster_settings.py module and create
ClusterSettings object to house the various settings related to
initialization (timeouts, cluster opts, tracing, transactions config,
etc.)
* start to move transforms and validation away from _utils and into
specific modules (will be used more extensively once options
processing logic is updated)
* Add overload_registry module (will take place of the overloading used
in certain mgmt operations)
Change-Id: I57a737c289bea6ec530f2625aaa828ce9d285c5c
Reviewed-on: https://review.couchbase.org/c/couchbase-python-client/+/239235
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dimitris Christodoulou <dimitris.christodoulou@couchbase.com>1 parent f614e46 commit e0615f2
55 files changed
Lines changed: 3284 additions & 921 deletions
File tree
- acouchbase
- logic
- tests
- transactions
- couchbase
- logic
- tests
- transactions
- logic
- src
- tests
- environments
- txcouchbase
- logic
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 49 | + | |
| 50 | + | |
56 | 51 | | |
57 | 52 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
88 | 57 | | |
89 | 58 | | |
90 | 59 | | |
| |||
94 | 63 | | |
95 | 64 | | |
96 | 65 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 66 | + | |
102 | 67 | | |
103 | 68 | | |
104 | 69 | | |
| |||
109 | 74 | | |
110 | 75 | | |
111 | 76 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 77 | + | |
118 | 78 | | |
119 | | - | |
120 | | - | |
| 79 | + | |
121 | 80 | | |
122 | 81 | | |
123 | 82 | | |
| |||
126 | 85 | | |
127 | 86 | | |
128 | 87 | | |
129 | | - | |
130 | | - | |
| 88 | + | |
131 | 89 | | |
132 | 90 | | |
133 | 91 | | |
| |||
139 | 97 | | |
140 | 98 | | |
141 | 99 | | |
142 | | - | |
| 100 | + | |
143 | 101 | | |
144 | 102 | | |
145 | 103 | | |
| |||
161 | 119 | | |
162 | 120 | | |
163 | 121 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
169 | 126 | | |
170 | 127 | | |
171 | 128 | | |
| |||
180 | 137 | | |
181 | 138 | | |
182 | 139 | | |
183 | | - | |
| 140 | + | |
| 141 | + | |
184 | 142 | | |
185 | 143 | | |
186 | 144 | | |
| |||
231 | 189 | | |
232 | 190 | | |
233 | 191 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 192 | + | |
| 193 | + | |
245 | 194 | | |
246 | 195 | | |
247 | 196 | | |
| |||
251 | 200 | | |
252 | 201 | | |
253 | 202 | | |
254 | | - | |
| 203 | + | |
255 | 204 | | |
256 | 205 | | |
257 | 206 | | |
| |||
267 | 216 | | |
268 | 217 | | |
269 | 218 | | |
270 | | - | |
| 219 | + | |
271 | 220 | | |
272 | 221 | | |
273 | 222 | | |
0 commit comments