From 22f8122b13e6c856aad9c8a76ace72d1f783dc2f Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 1 Aug 2024 15:18:57 +0100 Subject: [PATCH] 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. --- contrib/kh2reg.py | 4 ++-- test/testcrypt.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/kh2reg.py b/contrib/kh2reg.py index cff06c8f..81e79a43 100755 --- a/contrib/kh2reg.py +++ b/contrib/kh2reg.py @@ -27,7 +27,7 @@ def winmungestr(s): candot = 0 r = "" for c in s: - if c in ' \*?%~' or ord(c)