From 3c50643a873d2a4c7058ff51e8be9eabbc44a1b6 Mon Sep 17 00:00:00 2001 From: fwingerter-Ocient <66263689+fwingerter-Ocient@users.noreply.github.com> Date: Wed, 20 Jan 2021 13:22:38 -0500 Subject: [PATCH] Use raw string for jpype version regex In a non-raw string, regex escapes and character classes must themselves be backslash-escaped. Previously this string was equivalent to 'd+.d+', which was not the intended regex. --- jaydebeapi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaydebeapi/__init__.py b/jaydebeapi/__init__.py index a890c3d..67bf06c 100644 --- a/jaydebeapi/__init__.py +++ b/jaydebeapi/__init__.py @@ -185,7 +185,7 @@ def _jdbc_connect_jpype(jclassname, url, driver_args, jars, libs): global old_jpype if hasattr(jpype, '__version__'): try: - ver_match = re.match('\d+\.\d+', jpype.__version__) + ver_match = re.match(r'\d+\.\d+', jpype.__version__) if ver_match: jpype_ver = float(ver_match.group(0)) if jpype_ver < 0.7: