pyupio/dparse

Deprecation warning due to invalid escape sequences

tirkarthi opened this issue · 1 comments

  • Dependency Parser version: master branch
  • Python version: Python 3.8
  • Operating System: Linux

Description

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{} python3.8 -Wall -m py_compile {} 

./dparse/regex.py:10: DeprecationWarning: invalid escape sequence \S
  "(?:\S+(?::\S*)?@)?"
./dparse/regex.py:14: DeprecationWarning: invalid escape sequence \.
  "(?!(?:10|127)(?:\.\d{1,3}){3})"
./dparse/regex.py:15: DeprecationWarning: invalid escape sequence \.
  "(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})"
./dparse/regex.py:16: DeprecationWarning: invalid escape sequence \.
  "(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})"
./dparse/regex.py:22: DeprecationWarning: invalid escape sequence \d
  "(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])"
./dparse/regex.py:23: DeprecationWarning: invalid escape sequence \.
  "(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}"
./dparse/regex.py:24: DeprecationWarning: invalid escape sequence \.
  "(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))"
./dparse/regex.py:29: DeprecationWarning: invalid escape sequence \.
  "(?:\.(?:[a-z\u00a1-\uffff0-9]-?)*[a-z\u00a1-\uffff0-9]+)*"
./dparse/regex.py:31: DeprecationWarning: invalid escape sequence \.
  "(?:\.(?:[a-z\u00a1-\uffff]{2,}))"
./dparse/regex.py:34: DeprecationWarning: invalid escape sequence \d
  "(?::\d{2,5})?"
./dparse/regex.py:36: DeprecationWarning: invalid escape sequence \S
  "(?:/\S*)?",

Fixed in 0.5.2