From 1e7750c895c7364e3df7cb273ad1f8806b0e8770 Mon Sep 17 00:00:00 2001 From: Moussa Taifi Date: Wed, 20 Jul 2022 22:21:30 -0400 Subject: [PATCH] Fix string type to remove deprecation warning for 3.8+ Example deprecation warning message: ``` DeprecationWarning: invalid escape sequence \d 'v(\d+)\.(\d+)\.(\d)+.*', ``` Is there a way to add a test for this? Thanks --- sqla_vertica_python/vertica_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqla_vertica_python/vertica_python.py b/sqla_vertica_python/vertica_python.py index 674788f..fa913e7 100755 --- a/sqla_vertica_python/vertica_python.py +++ b/sqla_vertica_python/vertica_python.py @@ -148,7 +148,7 @@ def _get_server_version_info(self, connection): v = connection.scalar("select version()") m = re.match( '.*Vertica Analytic Database ' - 'v(\d+)\.(\d+)\.(\d)+.*', + r'v(\d+)\.(\d+)\.(\d)+.*', v) if not m: raise AssertionError(