Python 3.12 introduced the following change: https://docs.python.org/3.12/whatsnew/3.12.html
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.)
A few regular expressions now need to use raw strings. Example:
self.regex_uuenc = re.compile('^begin[ \t]+\d{3,4}[ \t]+\w+\.\w', re.M)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid escape sequence '\d'
Python 3.12 introduced the following change: https://docs.python.org/3.12/whatsnew/3.12.html
A few regular expressions now need to use raw strings. Example: