zk_shell icon indicating copy to clipboard operation
zk_shell copied to clipboard

Allow valid syntax for regex python 3.12

Open steffanlund opened this issue 2 years ago • 1 comments

What’s New In Python 3.12

https://docs.python.org/3/whatsnew/3.12.html#other-language-changes

A backslash-character pair that is not a valid escape sequence now generates a [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning), instead of [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning). For example, re.compile("\d+\.\d+") now emits a [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning) ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+\.\d+")). In a future Python version, [SyntaxError](https://docs.python.org/3/library/exceptions.html#SyntaxError) will eventually be raised, instead of [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning). (Contributed by Victor Stinner in [gh-98401](https://github.com/python/cpython/issues/98401).)

steffanlund avatar Nov 01 '23 13:11 steffanlund

@Yasumoto could you review please?

rgs1 avatar Nov 02 '23 11:11 rgs1