Skip to content

Deprecation warning due to invalid escape sequences in Python 3.8 #9

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.

I will add a PR

find . -iname '*.py'  | xargs -P 4 -I{} python3.8 -Wall -m py_compile {} 

./test/df_test.py:32: DeprecationWarning: invalid escape sequence \s
  (filesystem, capacity, used, remaining, pct) = re.split("\s+", expected_output)
./snakebite/rpc_sasl.py:85: DeprecationWarning: invalid escape sequence \/
  service = re.split('[\/@]', str(self.hdfs_namenode_principal))[0]
./snakebite/minicluster.py:204: DeprecationWarning: invalid escape sequence \d
  m = re.match(".*Started MiniDFSCluster -- namenode on port (\d+).*", line)
./snakebite/minicluster.py:214: DeprecationWarning: invalid escape sequence \s
  (perms, replication, owner, group, length, date, time, path) = re.split("\s+", line)
./snakebite/minicluster.py:236: DeprecationWarning: invalid escape sequence \s
  fields = re.split("\s+", line)
./snakebite/minicluster.py:240: DeprecationWarning: invalid escape sequence \s
  (length, path) = re.split("\s+", line)
./snakebite/minicluster.py:238: DeprecationWarning: invalid escape sequence \s
  (length, space_consumed, path) = re.split("\s+", line)
./snakebite/minicluster.py:253: DeprecationWarning: invalid escape sequence \s
  (_, dir_count, file_count, length, path) = re.split("\s+", line)
./snakebite/client.py:816: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  elif not load['error'] is '':

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions