8000 Deprecation warning due to invalid escape sequences in Python 3.8 · Issue #37 · kxxoling/PTable · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Deprecation warning due to invalid escape sequences in Python 3.8 #37
Open
@tirkarthi

Description

@tirkarthi

Deprecation warnings are raised due to invalid escape sequences in Python 3.8 . Below is a log of the warnings raised during compiling all the python files. Using raw strings or escaping them will fix this issue.

find . -iname '*.py'  | xargs -P 4 -I{} python -Walways -m py_compile {}
./prettytable/prettytable.py:25: DeprecationWarning: invalid escape sequence \[
  _re = re.compile("\033\[[0-9;]*m")
./prettytable/prettytable.py:925: DeprecationWarning: invalid escape sequence \{
  self.vertical_char = random.choice("~!@#$%^&*()_+|-=\{}[];':\",./;<>?")
./prettytable/prettytable.py:926: DeprecationWarning: invalid escape sequence \{
  self.horizontal_char = random.choice("~!@#$%^&*()_+|-=\{}[];':\",./;<>?")
./prettytable/prettytable.py:927: DeprecationWarning: invalid escape sequence \{
  self.junction_char = random.choice("~!@#$%^&*()_+|-=\{}[];':\",./;<>?")
./prettytable/prettytable.py:424: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif val is None or (isinstance(val, dict) and len(val) is 0):
./prettytable/prettytable.py:444: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif val is None or (isinstance(val, dict) and len(val) is 0):
./prettytable/prettytable.py:462: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if val is None or (isinstance(val, dict) and len(val) is 0):
./prettytable/prettytable.py:492: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if val is None or (isinstance(val, dict) and len(val) is 0):
./prettytable/prettytable.py:690: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if val is None or (isinstance(val, dict) and len(val) is 0):
./prettytable/prettytable.py:707: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if val is None or (isinstance(val, dict) and len(val) is 0):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0