From 30d492602aa6b3e18d29b360fbccec11140e95d4 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Fri, 4 Oct 2024 06:13:54 -0400 Subject: [PATCH] Fix SyntaxWarning: invalid escape sequence on Python 3.12 --- sonic/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonic/client.py b/sonic/client.py index 1fec80c..73184e9 100644 --- a/sonic/client.py +++ b/sonic/client.py @@ -112,7 +112,7 @@ def _parse_protocol_version(text): Returns: str -- protocol version. """ - matches = re.findall("protocol\((\w+)\)", text) + matches = re.findall(r"protocol\((\w+)\)", text) if not matches: raise ValueError("{} doesn't contain protocol(NUMBER)".format(text)) return matches[0] @@ -131,7 +131,7 @@ def _parse_buffer_size(text): str -- buffering. """ - matches = re.findall("buffer\((\w+)\)", text) + matches = re.findall(r"buffer\((\w+)\)", text) if not matches: raise ValueError("{} doesn't contain buffer(NUMBER)".format(text)) return matches[0] @@ -150,7 +150,7 @@ def _get_async_response_id(text): str -- async response id """ text = text.strip() - matches = re.findall("PENDING (\w+)", text) + matches = re.findall(r"PENDING (\w+)", text) if not matches: raise ValueError("{} doesn't contain async response id".format(text)) return matches[0]