Hello John,
Thanks for your fast reply
On 22/4/19 2:08, John Rouillard wrote:
> Which version of python 3.7 are you running?
Python 3.7.3
>
>
> If in the root of the checked out tree, you run python3 demo.py (as
> specified in README.txt) without virtualenv, does that work or does it
> generate a crash?
Without virtualenv it generates the same crash.
>
>
> Also for testing purposes, what happens if from the root of the
> checked out tree you run:
>
> mkdir example
> python3 roundup/scripts/roundup_admin.py -i example install classic
Same crash without virtualenv.
>
>
> Do you still see the error? Try this both with and without virtualenv.
>
> I can't reproduce the crash with python 3.4 using the following
> command line:
>
> python3 ../roundup/scripts/roundup_admin -i . install jinja2
>
> it prompts me for the database to use. No crashes.
>
> Looking at the traceback, I expect any attempt to import rest.py would
> cause this crash.
Right, any import of the routes produces the crash.
> Our CI pipeline tests python 3.4 through 3.6 and
> imports rest.py. I don't know of any change to regular expressions in
> 3.7 that would make \w (all word characters) an invalid character
> class.
>
>> Which have me the following exception:
>>
>> Traceback (most recent call last):
>> File "/home/pokoli/.virtualenvs/roundup/lib/python3.7/sre_parse.py",
>> line 1021, in parse_template
>> this = chr(ESCAPES[this][1])
>> KeyError: '\\w'
> I am guesing the \\w is coming from whatever ESCAPES is doing and it
> doubles the \.
This is the representation of the regular expression on which \w is
escaped, so it shows \\w
>
> Can you check rest.py and make sure that you have the following three
> lines starting at line 244:
>
> class Routing(object):
> __route_map = {}
> __var_to_regex = re.compile(r"<:(\w+)>")
> url_to_regex = r"([\w.\-~!$&'()*+,;=:\%%]+)"
>
> The last line is the regexp that is causing the crash according to
> the traceback.
Yes, that's the lines that I have and the one I've patched in order to
fix them. |