From 3eb7828df29c6e5e9a01956a45ec9cb5c37936c2 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Tue, 17 Feb 2026 18:06:59 -0800 Subject: [PATCH] astconfigparser.py: Fix regex pattern error by properly escaping string "SyntaxWarning: invalid escape sequence '\s'" occurs when using the pjsip migration script because '\' is an escape character in Python. Instead, use a raw string for the regex. --- contrib/scripts/sip_to_pjsip/astconfigparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/scripts/sip_to_pjsip/astconfigparser.py b/contrib/scripts/sip_to_pjsip/astconfigparser.py index eb48b70d7a..eb3885ec6b 100644 --- a/contrib/scripts/sip_to_pjsip/astconfigparser.py +++ b/contrib/scripts/sip_to_pjsip/astconfigparser.py @@ -240,7 +240,7 @@ def try_include(line): included filename, otherwise None. """ - match = re.match('^#include\s*([^;]+).*$', line) + match = re.match(r'^#include\s*([^;]+).*$', line) if match: trimmed = match.group(1).rstrip() quoted = re.match('^"([^"]+)"$', trimmed)