Fix invalid escape sequence deprecation warnings by jdufresne · Pull Request #5560 · encode/django-rest-framework (original) (raw)
When running tests with warnings enabled, appear as:
DeprecationWarning: invalid escape sequence \d
Starting with Python 3.6, invalid escape sequences are deprecated. In a future Python versions they will be a syntax error. For more details, see:
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning. Although this will eventually become a SyntaxError, that will not be for several Python releases.