Mercurial > p > roundup > code
diff roundup/rest.py @ 5715:d9a3f6957731
issue2551042 - add extra \ to \w in raw string url_to_regex. Not sure
why this is needed. Maybe something changed in how raw strings are
interpreted? Without patch causes crash:
re.error: bad escape \w at position 2
under python 3.7
Also tried to add python 3.7 (hopefully 3.7.3) to travis.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 28 Apr 2019 18:28:44 -0400 |
| parents | aea2cc142c1b |
| children | e199d0ae4a25 |
line wrap: on
line diff
--- a/roundup/rest.py Wed Apr 24 17:50:55 2019 -0400 +++ b/roundup/rest.py Sun Apr 28 18:28:44 2019 -0400 @@ -244,7 +244,7 @@ class Routing(object): __route_map = {} __var_to_regex = re.compile(r"<:(\w+)>") - url_to_regex = r"([\w.\-~!$&'()*+,;=:\%%]+)" + url_to_regex = r"([\\w.\-~!$&'()*+,;=:\%%]+)" @classmethod def route(cls, rule, methods='GET'):
