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.
Using python 3.12 a regex
DeprecationWarning
got upgraded toSyntaxWarning
.from https://docs.python.org/3/whatsnew/3.12.html#other-language-changes