google / textfsm

Python module for parsing semi-structured text into python tables.
Apache License 2.0
1.11k stars 171 forks source link

Deprecation warning due to invalid escape sequences and literal comparison in Python 3.7 #79

Closed tirkarthi closed 3 years ago

tirkarthi commented 4 years ago

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. Syntax warning is caused due to comparison of literals using is.

find . -iname '*.py' | grep -Ev 'example|utl|samples|deps' | xargs -P 4 -I{} python3.8 -Wall -m py_compile {} 
./textfsm/terminal.py:207: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if token is '':
./tests/textfsm_test.py:82: DeprecationWarning: invalid escape sequence \[
  'Value beer (boo\[)\]hoo)')