Closed wumpus closed 7 years ago
That's seems like regression in cpython.
Oh, right, I didn't check the documentation for "re" -- after looking at compiled.pattern I think you're correct.
The python folks say that re.escape() was escaping too much in the past, and has been fixed. Their response to my bug report was to add more documentation to "porting to 3.7".
http://bugs.python.org/issue29995 -- bug for re.escape over-escaping
http://bugs.python.org/issue30147 -- my bug report
So, basically, they say your test is now wrong.
does it work with "python -OO "?
Yes, python 3.7-dev passes with "python -OO". Which is pretty weird.
$ pyenv local 3.7-dev
$ python bug.py
re.compile('/foo')
/foo
Traceback (most recent call last):
File "bug.py", line 6, in <module>
assert r.pattern.startswith('\\/')
AssertionError
$ python -OO bug.py
re.compile('/foo')
/foo
but does web server work?
@asvetlov could you look into this problem too?
@wumpus thanks for raising the issue
I have python3.7-dev and python-nightly in my CI script. Recently they started failing when I call app.router.add_get()
This is a minimal reproducer, works on 3.6 and fails on 3.7-dev
Python 3.7-dev output:
python 3.6.0 output (success):
This is the actual traceback my full app gets in 3.7-dev and aiohttp-2.0.7:
Your environment
The above 3.6 and 3.7 output was run on CentOS 7 with python installed by pyenv.