You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)
The text was updated successfully, but these errors were encountered:
Seeing an warning on our django deployment:
drf_api_logger/utils.py:63: SyntaxWarning: invalid escape sequence '\g
I believe the string that includes the \g escape just needs to be an r-string (e.g.
r'\g<1>***FILTERED***\g<3>'
) to remove this warning.I believe this is due to a new Python 3.12 feature - second bullet point of https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes - which also indicates this will become a SyntaxError in the future:
The text was updated successfully, but these errors were encountered: