miracle2k / webassets

Asset management for Python web development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecation warning due to invalid escape sequences in Python 3.7

tirkarthi opened this issue · comments

Deprecation warning are raised due to invalid escape sequences. This can be fixed by using raw string or escaping them.

find . -iname '*.py'  | xargs -P 4 -I{} python -Walways -m py_compile {}

./src/webassets/filter/__init__.py:42: DeprecationWarning: invalid escape sequence \,
  """Split while allowing escaping.
./src/webassets/filter/replace.py:9: DeprecationWarning: invalid escape sequence \s
  """
./tests/test_filters.py:128: DeprecationWarning: invalid escape sequence \,
  os.environ['foo'] = 'one,two\,three'
./tests/test_filters.py:132: DeprecationWarning: invalid escape sequence \,
  m.config['foo'] = 'one,two\,three'
./tests/test_filters.py:133: DeprecationWarning: invalid escape sequence \,
  assert get_config(setting='foo', type=list) == 'one,two\,three'
./tests/test_filters.py:1387: DeprecationWarning: invalid escape sequence \S
  self.create_files({'backslashes.jst': """<input type="text" pattern="\S*"/>"""})