isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

Deprecation warning due to invalid escape sequences in Python 3.7 #271

Open tirkarthi opened 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. versioneer file is autogenerated and has an issue upstream.

find . -iname '*.py' | grep -v example | xargs -P 4 -I{} python3.8 -Wall -m py_compile {}
./versioneer.py:97: DeprecationWarning: invalid escape sequence \s
  LONG_VERSION_PY = '''
./pretty_bad_protocol/_parsers.py:846: DeprecationWarning: invalid escape sequence \d
  allowed_entry = re.findall('^(\d+)(|w|m|y)$', self._expiration_time)
./pretty_bad_protocol/_meta.py:57: DeprecationWarning: invalid escape sequence \d
  _VERSION_RE = re.compile('^\d+\.\d+\.\d+$')
./pretty_bad_protocol/_util.py:129: DeprecationWarning: invalid escape sequence \d
  _VERSION_STRING_REGEX = re.compile('(\d)(\.)(\d)(\.)(\d+)')