From 42936ff1795fc30aaa37a0491963940c24c49231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20M=C3=BCller?= Date: Tue, 10 Sep 2024 22:28:22 +0200 Subject: [PATCH] reg: use os.path b/c relpath only has walk_up in python 3.12 --- src/dcnum/logic/ctrl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dcnum/logic/ctrl.py b/src/dcnum/logic/ctrl.py index a2c0f64..46a4c32 100644 --- a/src/dcnum/logic/ctrl.py +++ b/src/dcnum/logic/ctrl.py @@ -682,7 +682,7 @@ def task_enforce_basin_strategy(self): paths = [pin] pout = pathlib.Path(hout.filename).resolve().parent try: - paths.append(pout.relative_to(pin)) + paths.append(os.path.relpath(pin, pout)) except ValueError: # This means it is impossible to compute a relative # path (e.g. different drive letter on Windows).