Skip to content

Commit b8441ed

Browse files
authored
Merge pull request #296 from rethinkdb/srh/loop310
Remove loop params that break in Python 3.10
2 parents 5c59361 + 10e9545 commit b8441ed

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rethinkdb/asyncio_net/net_asyncio.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def wait(future):
7575
new_timeout = max(deadline - loop.time(), 0)
7676
else:
7777
new_timeout = None
78-
return (yield from asyncio.wait_for(future, new_timeout, loop=loop))
78+
return (yield from asyncio.wait_for(future, new_timeout))
7979

8080
return wait
8181

@@ -202,7 +202,6 @@ def connect(self, timeout):
202202
self._streamreader, self._streamwriter = yield from asyncio.open_connection(
203203
self._parent.host,
204204
self._parent.port,
205-
loop=self._io_loop,
206205
ssl=ssl_context,
207206
)
208207
self._streamwriter.get_extra_info("socket").setsockopt(
@@ -227,13 +226,12 @@ def connect(self, timeout):
227226
break
228227
# This may happen in the `V1_0` protocol where we send two requests as
229228
# an optimization, then need to read each separately
230-
if request is not "":
229+
if request != "":
231230
self._streamwriter.write(request)
232231

233232
response = yield from asyncio.wait_for(
234233
_read_until(self._streamreader, b"\0"),
235234
timeout,
236-
loop=self._io_loop,
237235
)
238236
response = response[:-1]
239237
except ReqlAuthError:

0 commit comments

Comments
 (0)