Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

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

Open
tirkarthi opened this issue Feb 8, 2020 · 0 comments
Open

Comments

@tirkarthi
Copy link

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 -Wall -m py_compile {}
./tests/mock_connection.py:110: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/(\d+)$', uri)
./tests/mock_connection.py:125: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/(\d+)$', uri)
./tests/mock_connection.py:228: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/(\d+)(\/charts)?$', uri)
./tests/mock_connection.py:241: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/(\d+)\/charts$', uri)
./tests/mock_connection.py:261: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/(\d+)\/charts$', uri)
./tests/mock_connection.py:276: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/spaces\/(\d+)\/charts\/(\d+)$', uri)
./tests/mock_connection.py:300: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/spaces\/(\d+)\/charts\/(\d+)$', uri)
./tests/mock_connection.py:322: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/(\d+)(\/charts)?$', uri)
./tests/mock_connection.py:337: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/(\d+)(\/charts)?$', uri)
./tests/mock_connection.py:352: DeprecationWarning: invalid escape sequence \/
  m = re.search('\/spaces\/(\d+)\/charts\/(\d+)$', uri)
./tests/mock_connection.py:568: DeprecationWarning: invalid escape sequence \d
  (re.match('/v1/alerts/\d+', self.request.uri) or
./tests/mock_connection.py:569: DeprecationWarning: invalid escape sequence \d
  (re.match('/v1/spaces/(\d+)(\/charts/\d+)?$', self.request.uri))))
./tests/mock_connection.py:573: DeprecationWarning: invalid escape sequence \w
  re.match('/v1/metrics/([\w_]+)', self.request.uri))
./tests/mock_connection.py:577: DeprecationWarning: invalid escape sequence \w
  re.match('/v1/measurements/([\w_]+)', self.request.uri))
./tests/mock_connection.py:581: DeprecationWarning: invalid escape sequence \w
  re.match('/v1/%s/([\w_]+).json' % what, self.request.uri))
./tests/mock_connection.py:594: DeprecationWarning: invalid escape sequence \?
  return self._method_is('GET') and re.match('/v1/alerts\?name=.+',
./tests/mock_connection.py:599: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/alerts/\d+', self.request.uri))
./tests/mock_connection.py:612: DeprecationWarning: invalid escape sequence \?
  re.match('/v1/spaces\?name=.+$', self.request.uri))
./tests/mock_connection.py:616: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+$', self.request.uri))
./tests/mock_connection.py:620: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+/charts$', self.request.uri))
./tests/mock_connection.py:624: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+/charts/\d+', self.request.uri))
./tests/mock_connection.py:631: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+/charts$', self.request.uri))
./tests/mock_connection.py:635: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+$', self.request.uri))
./tests/mock_connection.py:639: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+/charts/\d+', self.request.uri))
./tests/mock_connection.py:643: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+$', self.request.uri))
./tests/mock_connection.py:647: DeprecationWarning: invalid escape sequence \d
  re.match('/v1/spaces/\d+/charts/\d+$', self.request.uri))
./tests/mock_connection.py:657: DeprecationWarning: invalid escape sequence \w
  m = re.match('/v1/measurements/([\w_.]+)', self.request.uri)
./tests/mock_connection.py:659: DeprecationWarning: invalid escape sequence \w
  m = re.match('/v1/metrics/([\w_.]+)', self.request.uri)
./tests/mock_connection.py:667: DeprecationWarning: invalid escape sequence \w
  m = re.match('/v1/alerts/([\w_]+)', self.request.uri)
./tests/mock_connection.py:675: DeprecationWarning: invalid escape sequence \w
  m = re.match('.*name=([\w_]+)', self.request.uri)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant