Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix SyntaxWarning due to unescaped sequence #366

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

Merged
merged 1 commit into from
Jan 18, 2019
Merged

Fix SyntaxWarning due to unescaped sequence #366

merged 1 commit into from
Jan 18, 2019

Conversation

tirkarthi
Copy link
Contributor

This seemed to be trivial one so I didn't open an issue. This fixes a SyntaxWarning introduced on CPython master that will be released as 3.8. It's already a DeprecationWarning on Python 3.6. The escape sequence needs to be present inside a raw string to fix the warning.

prometheus_client/decorator.py:82
  /home/karthi/client_python/prometheus_client/decorator.py:82: SyntaxWarning: invalid escape sequence \s
    DEF = re.compile('\s*def\s*([_\w][_\w\d]*)\s*\(')

Thanks for the library :)

@brian-brazil brian-brazil merged commit 4aa1936 into prometheus:master Jan 18, 2019
@brian-brazil
Copy link
Contributor

Thanks!

@tirkarthi tirkarthi deleted the fix-syntax-warning branch January 18, 2019 11:18
@tirkarthi tirkarthi restored the fix-syntax-warning branch January 18, 2019 11:18
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 this pull request may close these issues.

2 participants