diff --git a/weldx/asdf/file.py b/weldx/asdf/file.py index 831dc4ace..decc873ac 100644 --- a/weldx/asdf/file.py +++ b/weldx/asdf/file.py @@ -50,10 +50,10 @@ def asdf_open_memory_mapping_kwarg(memmap: bool) -> dict: - if tuple(int(part) for part in importlib.metadata.version("asdf").split(".")) >= ( - 3, - 1, - 0, + if tuple(importlib.metadata.version("asdf").split(".")) >= ( + "3", + "1", + "0", ): return {"memmap": memmap} else: diff --git a/weldx/asdf/util.py b/weldx/asdf/util.py index afde0f28b..9da1d5412 100644 --- a/weldx/asdf/util.py +++ b/weldx/asdf/util.py @@ -162,8 +162,8 @@ def read_buffer_context( open_kwargs = {"memmap": False, "lazy_load": False} if "memmap" in open_kwargs and tuple( - int(part) for part in importlib.metadata.version("asdf").split(".") - ) < (3, 1, 0): + importlib.metadata.version("asdf").split(".") + ) < ("3", "1", "0"): open_kwargs["copy_arrays"] = not open_kwargs["memmap"] del open_kwargs["memmap"]