Description: Declare strings with \ inside as raw

Origin: upstream, https://github.com/jazzband/imaplib2/commit/da0097f6b421c4b826416ea09b4802c163391330
Bug-Debian: https://bugs.debian.org/1074492
Last-Update: 2024-08-11
---

--- python-imaplib2-3.6.orig/imaplib2/imaplib2.py
+++ python-imaplib2-3.6/imaplib2/imaplib2.py
@@ -2490,7 +2490,7 @@ if __name__ == '__main__':
     ('select', ('imaplib2_test2',)),
     ('search', (None, 'SUBJECT', '"IMAP4 test"')),
     ('fetch', ('1:*', '(FLAGS INTERNALDATE RFC822)')),
-    ('store', ('1', 'FLAGS', '(\Deleted)')),
+    ('store', ('1', 'FLAGS', r'(\Deleted)')),
     ('namespace', ()),
     ('expunge', ()),
     ('recent', ()),
@@ -2595,7 +2595,7 @@ if __name__ == '__main__':
             if not uid: continue
             run('uid', ('FETCH', uid[-1],
                     '(FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822.TEXT)'))
-            run('uid', ('STORE', uid[-1], 'FLAGS', '(\Deleted)'))
+            run('uid', ('STORE', uid[-1], 'FLAGS', r'(\Deleted)'))
             run('expunge', ())
 
         if 'IDLE' in M.capabilities:
@@ -2609,10 +2609,10 @@ if __name__ == '__main__':
             dat = run('fetch', (num, '(FLAGS INTERNALDATE RFC822)'), cb=False)
             M._mesg('fetch %s => %s' % (num, repr(dat)))
             run('idle', (2,))
-            run('store', (num, '-FLAGS', '(\Seen)'), cb=False),
+            run('store', (num, '-FLAGS', r'(\Seen)'), cb=False),
             dat = run('fetch', (num, '(FLAGS INTERNALDATE RFC822)'), cb=False)
             M._mesg('fetch %s => %s' % (num, repr(dat)))
-            run('uid', ('STORE', num, 'FLAGS', '(\Deleted)'))
+            run('uid', ('STORE', num, 'FLAGS', r'(\Deleted)'))
             run('expunge', ())
             if idle_intr:
                 M._mesg('HIT CTRL-C to interrupt IDLE')
