Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb5a064

Browse files
committed
Resolve deprecation warning raised in rethinkdb#188
1 parent 66a6485 commit fb5a064

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

rethinkdb/asyncio_net/net_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def connect(self, timeout):
227227
break
228228
# This may happen in the `V1_0` protocol where we send two requests as
229229
# an optimization, then need to read each separately
230-
if request is not "":
230+
if request != "":
231231
self._streamwriter.write(request)
232232

233233
response = yield from asyncio.wait_for(

rethinkdb/gevent_net/net_gevent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def __init__(self, parent):
134134
break
135135
# This may happen in the `V1_0` protocol where we send two requests as
136136
# an optimization, then need to read each separately
137-
if request is not "":
137+
if request != "":
138138
self.sendall(request)
139139

140140
# The response from the server is a null-terminated string

rethinkdb/net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def __init__(self, parent, timeout):
403403
break
404404
# This may happen in the `V1_0` protocol where we send two requests as
405405
# an optimization, then need to read each separately
406-
if request is not "":
406+
if request != "":
407407
self.sendall(request)
408408

409409
# The response from the server is a null-terminated string

rethinkdb/tornado_net/net_tornado.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def connect(self, timeout):
158158
break
159159
# This may happen in the `V1_0` protocol where we send two requests as
160160
# an optimization, then need to read each separately
161-
if request is not "":
161+
if request != "":
162162
self._stream.write(request)
163163

164164
response = yield with_absolute_timeout(

rethinkdb/trio_net/net_trio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ async def connect(self, timeout):
280280
break
281281
# This may happen in the `V1_0` protocol where we send two requests as
282282
# an optimization, then need to read each separately
283-
if request is not "":
283+
if request != "":
284284
await self._send(request)
285285
with _reql_timeout(timeout):
286286
response = await self._read_until(b"\0")

scripts/convert_protofile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ def convertFile(inputFile, outputFile, language):
8686
assert(outputFile is not None and hasattr(outputFile, 'write'))
8787
assert(language in languageDefs)
8888

89-
messageRegex = re.compile('\s*(message|enum) (?P<name>\w+) \{')
90-
valueRegex = re.compile('\s*(?P<name>\w+)\s*=\s*(?P<value>\w+)')
91-
endRegex = re.compile('\s*\}')
89+
messageRegex = re.compile(r'\s*(message|enum) (?P<name>\w+) \{')
90+
valueRegex = re.compile(r'\s*(?P<name>\w+)\s*=\s*(?P<value>\w+)')
91+
endRegex = re.compile(r'\s*\}')
9292

9393
indentLevel = languageDefs[language]["initialIndentLevel"]
9494
lastIndentLevel = languageDefs[language]["initialIndentLevel"] - 1

0 commit comments

Comments
 (0)