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

Fix DeprecationWarning #325

Merged
merged 1 commit into from
Feb 21, 2020
Merged

Conversation

kronion
Copy link
Contributor

@kronion kronion commented Dec 7, 2019

Importing pyrollbar into a Django application with warnings enabled displays a DeprecationWarning caused by an invalid escape sequence in the docstring. The culprit is a regex pattern being interpreted as a Python escape sequence. The docstring should be a raw string in order to avoid parsing of Python escape sequences, and the example itself should also be updated for the same reason.

Test plan:
PYTHONDONTWRITEBYTECODE=true python3 -Wd -m rollbar.contrib.django.middleware.
Before patching the change, you should see the following warning:

/pyrollbar/rollbar/contrib/django/middleware.py:79: DeprecationWarning: invalid escape sequence \.

@waltjones
Copy link
Contributor

@kronion Try rebasing master. #328 should fix the travis issues.

@kronion kronion force-pushed the fix-deprecationwarning branch from fecf88c to 1b2edb0 Compare February 20, 2020 13:53
@waltjones
Copy link
Contributor

@kronion Thank you!

@waltjones waltjones merged commit 54e8234 into rollbar:master Feb 21, 2020
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