Skip to content

Commit 6937705

Browse files
committed
fix: add expr to init
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
1 parent f1ab498 commit 6937705

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Migration Guide
121121

122122
For users upgrading from 2.4.x to 2.5.0:
123123

124-
1. **Python**: Use Python 3.7+.
124+
1. **Python**: Use Python 3.10+.
125125
2. **Imports**: Update imports for moved modules (e.g., utilities now in `rethinkdb.utils`).
126126
3. **Exceptions**: Replace `Rql*` with `Reql*`. Adjust error handling for `ReqlAuthError`/`ReqlTimeoutError` host/port validation.
127127
4. **Handshake**: If customizing JSON encoding/decoding during handshake, pass `json_encoder`/`json_decoder` to `HandshakeV1_0`.

rethinkdb/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import warnings
2222

2323
from rethinkdb import net
24+
from rethinkdb.ast import expr
2425
from rethinkdb.query import (
2526
add,
2627
and_,
@@ -158,6 +159,7 @@
158159
"do": do,
159160
"epoch_time": epoch_time,
160161
"eq": eq,
162+
"expr": expr,
161163
"error": error,
162164
"february": february,
163165
"floor": floor,
@@ -239,12 +241,10 @@ class Client:
239241
def __init__(self):
240242
super().__init__()
241243

242-
self.net = net
243-
244244
net.Connection._r = self
245245
self.connection_type = None
246246

247-
self.make_connection = self.net.make_connection
247+
self.make_connection = net.make_connection
248248
self.set_loop_type(None)
249249

250250
def set_loop_type(self, library=None) -> None:
@@ -279,7 +279,7 @@ def set_loop_type(self, library=None) -> None:
279279
self.connection_type = TwistedConnection
280280

281281
if library is None or self.connection_type is None:
282-
self.connection_type = self.net.DefaultConnection
282+
self.connection_type = net.DefaultConnection
283283

284284
def connect(self, *connect_args, **kwargs):
285285
"""

0 commit comments

Comments
 (0)