Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning due to invalid escape sequences in Python 3.7 #73

Open
tirkarthi opened this issue Apr 15, 2020 · 0 comments · May be fixed by #74
Open

Deprecation warning due to invalid escape sequences in Python 3.7 #73

tirkarthi opened this issue Apr 15, 2020 · 0 comments · May be fixed by #74

Comments

@tirkarthi
Copy link

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

find . -iname '*.py' | grep -Ev 'example|utl|samples|deps' | xargs -P 4 -I{} python3.8 -Wall -m py_compile {} 
./test.py:36: DeprecationWarning: invalid escape sequence \,
  self.assertEqual(s, "a\,b\|c\=d")
./test.py:46: DeprecationWarning: invalid escape sequence \|
  self.assertEqual(s, "baz=ba\\r,qu\|ux|foo=a\,s\=df")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant