From 84d657540ad310a6e25ebc4786f3bcd9b9ce497c Mon Sep 17 00:00:00 2001 From: Wolfgang Waltenberger Date: Wed, 17 Apr 2024 18:21:09 +0200 Subject: [PATCH] python312 compatibility fixes --- smodels/installation.py | 2 +- unittests/testAsciiGraph.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/smodels/installation.py b/smodels/installation.py index 08b00dab93..5c48d95338 100755 --- a/smodels/installation.py +++ b/smodels/installation.py @@ -151,7 +151,7 @@ def version( return_tuple : bool = False ) -> Union[str,Tuple]: if not return_tuple: return l import re - ret = re.split("\.|-",l) + ret = re.split("\\.|-",l) for i,r in enumerate(ret): try: ret[i]=int(r) diff --git a/unittests/testAsciiGraph.py b/unittests/testAsciiGraph.py index 74c5eb4345..74fe83c16b 100755 --- a/unittests/testAsciiGraph.py +++ b/unittests/testAsciiGraph.py @@ -19,7 +19,7 @@ class AsciiTest(unittest.TestCase): def orig(self): - return """ /------------\\ + return r""" /------------\ | q q | | \ / | | ----*---- |