Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 5808:bab86c874efb | 5809:936275dfe1fa |
|---|---|
| 1570 | 1570 |
| 1571 # new node's id | 1571 # new node's id |
| 1572 newid = self.db.newid(self.classname) | 1572 newid = self.db.newid(self.classname) |
| 1573 | 1573 |
| 1574 # validate propvalues | 1574 # validate propvalues |
| 1575 num_re = re.compile('^\d+$') | 1575 num_re = re.compile(r'^\d+$') |
| 1576 for key, value in propvalues.items(): | 1576 for key, value in propvalues.items(): |
| 1577 if key == self.key: | 1577 if key == self.key: |
| 1578 try: | 1578 try: |
| 1579 self.lookup(value) | 1579 self.lookup(value) |
| 1580 except KeyError: | 1580 except KeyError: |
| 1798 raise DatabaseError(_('Database open read-only')) | 1798 raise DatabaseError(_('Database open read-only')) |
| 1799 | 1799 |
| 1800 node = self.db.getnode(self.classname, nodeid) | 1800 node = self.db.getnode(self.classname, nodeid) |
| 1801 if self.is_retired(nodeid): | 1801 if self.is_retired(nodeid): |
| 1802 raise IndexError('Requested item is retired') | 1802 raise IndexError('Requested item is retired') |
| 1803 num_re = re.compile('^\d+$') | 1803 num_re = re.compile(r'^\d+$') |
| 1804 | 1804 |
| 1805 # make a copy of the values dictionary - we'll modify the contents | 1805 # make a copy of the values dictionary - we'll modify the contents |
| 1806 propvalues = propvalues.copy() | 1806 propvalues = propvalues.copy() |
| 1807 | 1807 |
| 1808 # if the journal value is to be different, store it in here | 1808 # if the journal value is to be different, store it in here |
