httpbin icon indicating copy to clipboard operation
httpbin copied to clipboard

Deprecation warning due to invalid escape sequences in Python 3.7

Open tirkarthi opened this issue 4 years ago • 0 comments

Deprecation warning are generated over invalid escape sequences. This can be fixed by using raw strings or escaping the literals again.

find . -iname '*.py'  | xargs -P 4 -I{} python -Walways -m py_compile {}
./httpbin/helpers.py:26: DeprecationWarning: invalid escape sequence \_
  ASCII_ART = """
./httpbin/helpers.py:71: DeprecationWarning: invalid escape sequence \ 
  ANGRY_ASCII ="""
./httpbin/helpers.py:438: DeprecationWarning: invalid escape sequence \s
  match = re.search('\s*(W/)?\"?([^"]*)\"?\s*', part)

tirkarthi avatar Feb 29 '20 11:02 tirkarthi