Skip to content

Commit bd3337c

Browse files
committed
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.
1 parent b7baa2d commit bd3337c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python:
44
- 3.4
55
- 3.5
66
- 3.6
7+
- 3.7
78

89
sudo: false
910

roundup/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def parse_accept_header(accept):
244244
class Routing(object):
245245
__route_map = {}
246246
__var_to_regex = re.compile(r"<:(\w+)>")
247-
url_to_regex = r"([\w.\-~!$&'()*+,;=:\%%]+)"
247+
url_to_regex = r"([\\w.\-~!$&'()*+,;=:\%%]+)"
248248

249249
@classmethod
250250
def route(cls, rule, methods='GET'):

0 commit comments

Comments
 (0)