Skip to content

DeprecationWarning: invalid escape sequence \s #244

@andersk

Description

@andersk

When running with warnings enabled, talon dozens of warnings about invalid escape sequences:

/home/anders/python/talon/talon/quotations.py:24: DeprecationWarning: invalid escape sequence \s
  RE_FWD = re.compile("^[-]+[ ]*Forwarded message[ ]*[-]+\s*$", re.I | re.M)
/home/anders/python/talon/talon/quotations.py:131: DeprecationWarning: invalid escape sequence \s
  RE_ORIGINAL_MESSAGE = re.compile(u'[\s]*[-]+[ ]*({})[ ]*[-]+'.format(
/home/anders/python/talon/talon/quotations.py:141: DeprecationWarning: invalid escape sequence \s
  RE_FROM_COLON_OR_DATE_COLON = re.compile(u'((_+\r?\n)?[\s]*:?[*]?({})[\s]?:([^\n$]+\n){{1,2}}){{2,}}'.format(
/home/anders/python/talon/talon/quotations.py:154: DeprecationWarning: invalid escape sequence \s
  RE_ANDROID_WROTE = re.compile(u'[\s]*[-]+.*({})[ ]*[-]+'.format(
/home/anders/python/talon/talon/quotations.py:166: DeprecationWarning: invalid escape sequence \s
  RE_POLYMAIL = re.compile('On.*\s{2}<\smailto:.*\s> wrote:', re.I)
/home/anders/python/talon/talon/quotations.py:175: DeprecationWarning: invalid escape sequence \d
  re.compile("(\d+/\d+/\d+|\d+\.\d+\.\d+).*\s\S+@\S+", re.S),
/home/anders/python/talon/talon/quotations.py:178: DeprecationWarning: invalid escape sequence \d
  re.compile("\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}\s+GMT.*\s\S+@\S+", re.S),
/home/anders/python/talon/talon/quotations.py:180: DeprecationWarning: invalid escape sequence \S
  re.compile('\S{3,10}, \d\d? \S{3,10} 20\d\d,? \d\d?:\d\d(:\d\d)?'
/home/anders/python/talon/talon/quotations.py:181: DeprecationWarning: invalid escape sequence \S
  '( \S+){3,6}@\S+:'),
/home/anders/python/talon/talon/quotations.py:183: DeprecationWarning: invalid escape sequence \S
  re.compile('Sent from Samsung.* \S+@\S+> wrote'),
/home/anders/python/talon/talon/quotations.py:191: DeprecationWarning: invalid escape sequence \(
  RE_PARENTHESIS_LINK = re.compile("\(https?://")
/home/anders/python/talon/talon/quotations.py:197: DeprecationWarning: invalid escape sequence \S
  NO_QUOT_LINE = re.compile('^[^>].*[\S].*')
/home/anders/python/talon/talon/html_quotations.py:13: DeprecationWarning: invalid escape sequence \d
  CHECKPOINT_PATTERN = re.compile(CHECKPOINT_PREFIX + '\d+' + CHECKPOINT_SUFFIX)
/home/anders/python/talon/talon/signature/learning/helpers.py:16: DeprecationWarning: invalid escape sequence \S
  RE_EMAIL = rc('\S@\S')
/home/anders/python/talon/talon/signature/learning/helpers.py:17: DeprecationWarning: invalid escape sequence \(
  RE_RELAX_PHONE = rc('(\(? ?[\d]{2,3} ?\)?.{,3}?){2,}')
/home/anders/python/talon/talon/signature/learning/helpers.py:23: DeprecationWarning: invalid escape sequence \s
  RE_SEPARATOR = rc('^[\s]*---*[\s]*$')
/home/anders/python/talon/talon/signature/learning/helpers.py:28: DeprecationWarning: invalid escape sequence \s
  RE_SPECIAL_CHARS = rc(('^[\s]*([\*]|#|[\+]|[\^]|-|[\~]|[\&]|[\$]|_|[\!]|'
/home/anders/python/talon/talon/signature/learning/helpers.py:29: DeprecationWarning: invalid escape sequence \/
  '[\/]|[\%]|[\:]|[\=]){10,}[\s]*$'))
/home/anders/python/talon/talon/signature/learning/helpers.py:32: DeprecationWarning: invalid escape sequence \s
  '^sent[ ]{1}from[ ]{1}my[\s,!\w]*$|BR|(S|s)incerely|'
/home/anders/python/talon/talon/signature/learning/helpers.py:38: DeprecationWarning: invalid escape sequence \s
  RE_NAME = rc('[A-Z][a-z]+\s\s?[A-Z][\.]?\s\s?[A-Z][a-z]+')
/home/anders/python/talon/talon/signature/learning/helpers.py:40: DeprecationWarning: invalid escape sequence \(
  INVALID_WORD_START = rc('\(|\+|[\d]')
/home/anders/python/talon/talon/signature/learning/helpers.py:185: DeprecationWarning: invalid escape sequence \s
  words = re.split('\s', s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions