Mercurial > p > roundup > code
diff roundup/hyperdb.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 | 0467d80eaeec |
| children | ee2e8f8d6648 |
line wrap: on
line diff
--- a/roundup/hyperdb.py Wed Jun 12 19:52:29 2019 -0400 +++ b/roundup/hyperdb.py Wed Jun 12 20:34:47 2019 -0400 @@ -1570,7 +1570,7 @@ """ Error converting a raw value into a Hyperdb value """ pass -def convertLinkValue(db, propname, prop, value, idre=re.compile('^\d+$')): +def convertLinkValue(db, propname, prop, value, idre=re.compile(r'^\d+$')): """ Convert the link value (may be id or key value) to an id value. """ linkcl = db.classes[prop.classname] if not idre or not idre.match(value):
