comparison 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
comparison
equal deleted inserted replaced
5714:a5f5c044049f 5715:d9a3f6957731
242 242
243 243
244 class Routing(object): 244 class Routing(object):
245 __route_map = {} 245 __route_map = {}
246 __var_to_regex = re.compile(r"<:(\w+)>") 246 __var_to_regex = re.compile(r"<:(\w+)>")
247 url_to_regex = r"([\w.\-~!$&'()*+,;=:\%%]+)" 247 url_to_regex = r"([\\w.\-~!$&'()*+,;=:\%%]+)"
248 248
249 @classmethod 249 @classmethod
250 def route(cls, rule, methods='GET'): 250 def route(cls, rule, methods='GET'):
251 """A decorator that is used to register a view function for a 251 """A decorator that is used to register a view function for a
252 given URL rule: 252 given URL rule:

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