bottle icon indicating copy to clipboard operation
bottle copied to clipboard

Fix "DeprecationWarning: invalid escape sequence \["

Open ozooxo opened this issue 4 years ago • 1 comments

I think this two lines https://github.com/bottlepy/bottle/blob/f9b1849db4dd724e36a93a1032be592193fba581/bottle.py#L4057-L4058 are causing the below deprecation warnings (my warnings are from 0.12.17, but the newest (0.12.19) has the same problem):

/usr/local/bin/bottle.py:3433: DeprecationWarning: invalid escape sequence [ _re_tok += '|([[{(])'

../../../usr/local/bin/bottle.py:3434 /usr/local/bin/bottle.py:3434: DeprecationWarning: invalid escape sequence ] _re_tok += '|([]})])'

Could you please modify it as Python core suggested, so we can get rid of those warnings?

ozooxo avatar Jan 05 '21 19:01 ozooxo

I cannot reproduce these warnings in master branch. These lines are different in master using raw strings. So I guess this issue is fixed.

tirkarthi avatar Feb 27 '21 04:02 tirkarthi