From 3a6e2c49e8cfc8761c3da3191bf1ac1f3a27a736 Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Wed, 8 Apr 2026 14:19:19 +0200 Subject: [PATCH 1/8] remove strict=True keyword This keyword is incompatible with python 3.8. It is not needed here because the code checks around line 714 already whether both lists have the same length --- dataprov/dataprov.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dataprov/dataprov.py b/dataprov/dataprov.py index 1f9be2b..05fbe57 100644 --- a/dataprov/dataprov.py +++ b/dataprov/dataprov.py @@ -1,3 +1,4 @@ +from __future__ import annotations """ Data Provenance Tracking Library (PROV-JSON Format) @@ -855,7 +856,7 @@ def add( # Process input entities for i, (file_path, file_format) in enumerate( - zip(inputs, input_formats, strict=True) + zip(inputs, input_formats) ): entity_id = f"entity:{file_path}" From 7782182a68ec09edfde08a03f911b25afa6cb5d7 Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Wed, 8 Apr 2026 14:21:32 +0200 Subject: [PATCH 2/8] remove keyword again, same reasoning as previous commit --- dataprov/dataprov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataprov/dataprov.py b/dataprov/dataprov.py index 05fbe57..c099dcd 100644 --- a/dataprov/dataprov.py +++ b/dataprov/dataprov.py @@ -919,7 +919,7 @@ def add( # Process output entities for i, (file_path, file_format) in enumerate( - zip(outputs, output_formats, strict=True) + zip(outputs, output_formats) ): entity_id = f"entity:{file_path}" From e515f42dfa4aaa284412295804dfca7b6bbde1c7 Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Wed, 8 Apr 2026 14:37:12 +0200 Subject: [PATCH 3/8] reformat through ruff --- dataprov/dataprov.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dataprov/dataprov.py b/dataprov/dataprov.py index c099dcd..42a53b4 100644 --- a/dataprov/dataprov.py +++ b/dataprov/dataprov.py @@ -1,4 +1,5 @@ from __future__ import annotations + """ Data Provenance Tracking Library (PROV-JSON Format) @@ -855,9 +856,7 @@ def add( } # Process input entities - for i, (file_path, file_format) in enumerate( - zip(inputs, input_formats) - ): + for i, (file_path, file_format) in enumerate(zip(inputs, input_formats)): entity_id = f"entity:{file_path}" # Create entity if not exists @@ -918,9 +917,7 @@ def add( self.data["used"][usage_id] = usage # Process output entities - for i, (file_path, file_format) in enumerate( - zip(outputs, output_formats) - ): + for i, (file_path, file_format) in enumerate(zip(outputs, output_formats)): entity_id = f"entity:{file_path}" # Create entity From ab15fc02aca65c9e6c0025bc0b110c8e41397f40 Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Wed, 8 Apr 2026 14:37:44 +0200 Subject: [PATCH 4/8] adopt pyproject dependencies to work with 3.8 for non-dev and >=3.10 for dev --- pyproject.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 82dc55c..0d66634 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ license = {file = "LICENSE"} authors = [ {name = "Fredrik Warg"} ] -requires-python = ">=3.10" +requires-python = ">=3.8" classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -30,16 +30,16 @@ keywords = ["provenance", "data-lineage", "data-tracking", "metadata", "prov", " dev = [ "pytest>=7.0", "pytest-cov>=4.0", - "ruff>=0.8.0", - "pre-commit>=4.0", + "ruff>=0.8.0; python_version >= '3.10'", + "pre-commit>=4.0; python_version >= '3.10'", ] [dependency-groups] dev = [ "pytest>=7.0", "pytest-cov>=4.0", - "ruff>=0.8.0", - "pre-commit>=4.0", + "ruff>=0.8.0; python_version >= '3.10'", + "pre-commit>=4.0; python_version >= '3.10'", ] [project.scripts] From 5235f67ba5084e95fbd3ed76e271eca7f49f7410 Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Wed, 8 Apr 2026 14:38:05 +0200 Subject: [PATCH 5/8] mention new python version requirements in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 137257a..b2299e4 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e ".[dev]" ``` -**Note**: This package has no external runtime dependencies (uses only Python standard library). Development dependencies (pytest, pytest-cov) are only needed for running tests. +**Note**: This package has no external runtime dependencies (uses only Python standard library). Development dependencies (pytest, pytest-cov) are only needed for running tests. **Python >= 3.10 is required for installing the development dependencies.** ## Quick Start From 321e50ce14c8398e633ec548276d05321800f69d Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Wed, 8 Apr 2026 15:37:51 +0200 Subject: [PATCH 6/8] update version number to reflect new feature (compatibility with py38) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0d66634..2571cff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dataprov" -version = "3.0.2" +version = "3.1.0" description = "W3C PROV-compliant data provenance tracking library for recording processing chains" readme = "README.md" license = {file = "LICENSE"} From 063efcbd0445606248c82b8e7bab52fdf9a1f492 Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Tue, 14 Apr 2026 13:24:56 +0200 Subject: [PATCH 7/8] ignore zip() error from ruff --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2571cff..6736a4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,6 +80,7 @@ select = [ ignore = [ "E501", # line too long (handled by formatter) "SIM108", # use ternary operator (can reduce readability) + "B905", # zip() without 'strict=' ] [tool.ruff.lint.isort] From 1e2f4ea7664521d1ed9fe40c80c7a31246500525 Mon Sep 17 00:00:00 2001 From: Bastian Havers-Zulka Date: Tue, 14 Apr 2026 13:39:12 +0200 Subject: [PATCH 8/8] add more ruff linting exceptions --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6736a4e..2188fcb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,8 @@ ignore = [ "E501", # line too long (handled by formatter) "SIM108", # use ternary operator (can reduce readability) "B905", # zip() without 'strict=' + "E402", # Module level import not at top of file + "UP037", # Remove quotes from type annotation ] [tool.ruff.lint.isort]