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

Skip to content

Deprecation and syntax warnings in Python 3.8 #188

Closed
@tirkarthi

Description

@tirkarthi

Describe the bug

  • Deprecation warning due to invalid escape sequences in scripts folder. Using raw strings or escaping them again fixes the issue.
  • Syntax warning due to using is for comparison of literals

To Reproduce

find . -iname '*py' | grep -Ev 'setup|rdf4|tool' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./scripts/convert_protofile.py:89: DeprecationWarning: invalid escape sequence \s
  messageRegex = re.compile('\s*(message|enum) (?P<name>\w+) \{')
./scripts/convert_protofile.py:90: DeprecationWarning: invalid escape sequence \s
  valueRegex = re.compile('\s*(?P<name>\w+)\s*=\s*(?P<value>\w+)')
./scripts/convert_protofile.py:91: DeprecationWarning: invalid escape sequence \s
  endRegex = re.compile('\s*\}')
./rethinkdb/asyncio_net/net_asyncio.py:230: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if request is not "":
./rethinkdb/gevent_net/net_gevent.py:137: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if request is not "":
./rethinkdb/net.py:411: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if request is not "":
./rethinkdb/trio_net/net_trio.py:283: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if request is not "":
./rethinkdb/tornado_net/net_tornado.py:161: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if request is not "":

System info

  • Python client version: 3.8

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnot qualifiedThe issue is not checked yet by the owners

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions