From dbd0cfa07a763fea638d714948b99c8fd8cae4d5 Mon Sep 17 00:00:00 2001 From: Viktor Palmkvist Date: Thu, 20 Nov 2025 09:46:13 +0100 Subject: [PATCH] Handle changes in Python 3.14 --- treeppl/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/treeppl/base.py b/treeppl/base.py index 14ea808..5e96057 100644 --- a/treeppl/base.py +++ b/treeppl/base.py @@ -42,7 +42,11 @@ def get_tpplc_binary(): if not os.path.isdir(tppl_dir_path): with importlib.resources.path('treeppl', tarball_name) as tarball: with tarfile.open(tarball) as tar: - tar.extractall(tmp_dir) + if hasattr(tarfile, 'tar_filter'): + tar.extractall(tmp_dir, filter='tar') + else: + # NOTE(vipa, 2025-11-20): This allows us to support Python < 3.12 + tar.extractall(tmp_dir) return os.path.join(tppl_dir_path, "tpplc") class Model: