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 #5838

Closed
tirkarthi opened this issue Jun 5, 2020 · 0 comments · Fixed by #5843
Closed

Deprecation warning due to invalid escape sequences #5838

tirkarthi opened this issue Jun 5, 2020 · 0 comments · Fixed by #5843

Comments

@tirkarthi
Copy link

Describe the bug

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/

To Reproduce

find . -iname '*.py' | grep -v example | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./tools/c7n_sentry/test_sentry.py:50: DeprecationWarning: invalid escape sequence \m
  msg2 = """
./tests/zpill.py:274: DeprecationWarning: invalid escape sequence \d
  response_data = re.sub("\d{12}", ACCOUNT_ID, response_data)  # noqa

Background (please complete the following information):

  • OS: [e.g. OSX 10.15]
  • Python Version: 3.8
  • Custodian Version: master branch
  • Tool Version: [if applicable]
  • Cloud Provider: [e.g. gcp, aws, azure]
  • Policy: [please exclude any account/sensitive information]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants