lavr / python-emails

Modern python library for emails
http://python-emails.readthedocs.org
Other
400 stars 54 forks source link

Deprecation warning due to invalid escape sequences #148

Closed tirkarthi closed 4 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. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

find . -iname '*.py' | grep -v example | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./emails/loader/helpers.py:24: DeprecationWarning: invalid escape sequence \w
  re_charset = b"charset=\"?'?([\w-]+)\"?'?"