jazzband / imaplib2

Fork of Piers Lauder's imaplib2 library for Python.
https://imaplib2.readthedocs.io/
MIT License
34 stars 29 forks source link

Declare strings with \ inside as raw #50

Closed yarikoptic closed 3 months ago

yarikoptic commented 3 months ago

Otherwise would trigger DeprecationWarnings on py 3.12:

/usr/lib/python3/dist-packages/imaplib2.py:2472: SyntaxWarning: invalid escape sequence '\D'
  ('store', ('1', 'FLAGS', '(\Deleted)')),
/usr/lib/python3/dist-packages/imaplib2.py:2577: SyntaxWarning: invalid escape sequence '\D'
  run('uid', ('STORE', uid[-1], 'FLAGS', '(\Deleted)'))
/usr/lib/python3/dist-packages/imaplib2.py:2591: SyntaxWarning: invalid escape sequence '\S'
  run('store', (num, '-FLAGS', '(\Seen)'), cb=False),
/usr/lib/python3/dist-packages/imaplib2.py:2594: SyntaxWarning: invalid escape sequence '\D'
  run('uid', ('STORE', num, 'FLAGS', '(\Deleted)'))

Issue filed in Debian awhile back: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074492