diff roundup/backends/rdbms_common.py @ 5809:936275dfe1fa

Try to fix: DeprecationWarning: invalid escape sequence \d DeprecationWarning: invalid escape sequence \s DeprecationWarning: invalid escape sequence \) Strings under python 3 are unicode strings rather then "regular" strings as under python 2. So all regexps need to be raw strings. We will see how many I fixed and if I broke any.
author John Rouillard <rouilj@ieee.org>
date Wed, 12 Jun 2019 20:34:47 -0400
parents 6923225fd781
children ee2e8f8d6648
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Wed Jun 12 19:52:29 2019 -0400
+++ b/roundup/backends/rdbms_common.py	Wed Jun 12 20:34:47 2019 -0400
@@ -1572,7 +1572,7 @@
         newid = self.db.newid(self.classname)
 
         # validate propvalues
-        num_re = re.compile('^\d+$')
+        num_re = re.compile(r'^\d+$')
         for key, value in propvalues.items():
             if key == self.key:
                 try:
@@ -1800,7 +1800,7 @@
         node = self.db.getnode(self.classname, nodeid)
         if self.is_retired(nodeid):
             raise IndexError('Requested item is retired')
-        num_re = re.compile('^\d+$')
+        num_re = re.compile(r'^\d+$')
 
         # make a copy of the values dictionary - we'll modify the contents
         propvalues = propvalues.copy()

Roundup Issue Tracker: http://roundup-tracker.org/