1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Suppress syntax warnings on Python 3.12.

Python 3.12 has a new warning for backslash-character pairs that are not
valid escape sequences at the level of string literals, as opposed to in
some interior syntax such as regular expressions
(https://docs.python.org/3/whatsnew/3.12.html#other-language-changes).
Suppress it by using raw strings.
This commit is contained in:
Colin Watson
2024-08-01 15:18:57 +01:00
committed by Simon Tatham
parent 400c895ced
commit 22f8122b13
2 changed files with 4 additions and 4 deletions

View File

@ -308,8 +308,8 @@ def _lex_testcrypt_header(header):
# And then match a token
'({})'.format('|'.join((
# Punctuation
'\(',
'\)',
r'\(',
r'\)',
',',
# Identifier
'[A-Za-z_][A-Za-z0-9_]*',