DeprecationWarning over invalid escape sequences
See original GitHub issueelasticsearch-py
version (elasticsearch.__versionstr__
): master branch
Description of the problem including expected versus actual behavior:
DeprecationWarning over invalid escape sequences. Escaping them or using raw string literals is preferred.
Steps to reproduce:
find . -iname '*.py' | xargs -P 4 -I{} python3.8 -Wall -m py_compile {}
./elasticsearch-py/test_elasticsearch/test_connection.py:330: DeprecationWarning: invalid escape sequence \?
"^GET http://localhost:9200/\?param=42 \[status:500 request:0.[0-9]{3}s\]",
./elasticsearch-py/test_elasticsearch/test_connection.py:356: DeprecationWarning: invalid escape sequence \[
'#\[200\] \(0.[0-9]{3}s\)\n#\{\n# "answer": "that\\\\u0027s it!"\n#\}',
./elasticsearch-py/test_elasticsearch/test_connection.py:365: DeprecationWarning: invalid escape sequence \?
"GET http://localhost:9200/\?param=42 \[status:200 request:0.[0-9]{3}s\]",
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
invalid escape sequence" in Python? - Stack Overflow
A backslash isn't valid when not followed by one of the valid escape sequences, and newer versions of Python print a deprecation warning....
Read more >Why does Python log a DeprecationWarning saying “invalid ...
The combination of \ plus a second character is called an escape sequence. The warning “invalid escape sequence” is telling you that you've ......
Read more >Fix invalid escape sequence warning on python >=3.6 #680
Python 3.6 now throw warning for invalid escape sequences (https://bugs.python.org/issue27364). The string here contains invalid escapes ...
Read more >Pythontex Warning: "DeprecationWarning: invalid escape ...
Python interprets \m as an escape sequence, which it is not. I think this can be fixed by making the documentation a raw...
Read more >Fix DeprecationWarning: invalid escape sequence issues
Some regex strings contain invalid escape sequences for normal strings, causing newer version of Python to emit DeprecationWarning messages.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Don’t think so, thank yall for this 😃
Thanks @sethmlarson, I wasn’t sure if 3.8 deprecated or just produced a deprecation warning for a future release.