]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Bump the minimum required python version to 3.10
authorNicki Křížek <nicki@isc.org>
Tue, 30 Dec 2025 12:45:50 +0000 (13:45 +0100)
committerNicki Křížek <nicki@isc.org>
Wed, 21 Jan 2026 15:07:31 +0000 (16:07 +0100)
Drop support of EoL python versions for running system tests. The
maintenance cost of supporting end of life ecosystem, especially Python
3.6 on EL8 and the related outdated packages (pytest, dnspython, ...),
has become unreasonable.

bin/tests/system/README.md
bin/tests/system/conftest.py

index 3ebc33dbef3306568de4558a1bbcb78021e63c08..dc5f782779cd41409d708db1d5f5b47492c9c1e5 100644 (file)
@@ -46,16 +46,11 @@ nameserver and is listed in the hints file of the others.
 
 To run system tests, make sure you have the following dependencies installed:
 
-- python3
-- pytest
+- python3 (3.10 and newer)
 - perl
-- dnspython
-- pytest-xdist (for parallel execution)
-- python-jinja2
 
-Individual system tests might also require additional dependencies. If those
-are missing, the affected tests will be skipped and should produce a message
-specifying what additional prerequisites they expect.
+List of required python packages and their versions can be found in
+requirements.txt (can be installed with `pip3 install -r requirements.txt`).
 
 ### Network Setup
 
index a9db556e9beda71b4b73ea9b4a1cb26b892a1f61..3a46f4d492d976b22bd785bcd851c7dddf761f7f 100644 (file)
@@ -17,6 +17,7 @@ import shutil
 import subprocess
 import tempfile
 import time
+import sys
 
 import pytest
 
@@ -29,6 +30,8 @@ from isctest.vars.build import SYSTEM_TEST_DIR_GIT_PATH
 # Silence warnings caused by passing a pytest fixture to another fixture.
 # pylint: disable=redefined-outer-name
 
+if sys.version_info[1] < 10:
+    raise RuntimeError("Python 3.10 or newer is required to run system tests.")
 
 isctest.log.init_conftest_logger()
 isctest.log.avoid_duplicated_logs()
@@ -359,12 +362,6 @@ def system_test_dir(request, system_test_name, expected_artifacts):
         assert all(res.outcome == "passed" for res in test_results.values())
         return "passed"
 
-    def unlink(path):
-        try:
-            path.unlink()  # missing_ok=True isn't available on Python 3.6
-        except FileNotFoundError:
-            pass
-
     def check_artifacts(source_dir, run_dir):
         def check_artifacts_recursive(dcmp):
             def artifact_expected(path, expected):
@@ -409,7 +406,7 @@ def system_test_dir(request, system_test_name, expected_artifacts):
     # Create a convenience symlink with a stable and predictable name
     module_name = SYMLINK_REPLACEMENT_RE.sub(r"\1", str(request.node.path))
     symlink_dst = system_test_root / module_name
-    unlink(symlink_dst)
+    symlink_dst.unlink(missing_ok=True)
     symlink_dst.symlink_to(os.path.relpath(testdir, start=system_test_root))
 
     isctest.log.init_module_logger(system_test_name, testdir)
@@ -461,7 +458,7 @@ def system_test_dir(request, system_test_name, expected_artifacts):
         isctest.log.deinit_module_logger()
         if not keep:
             shutil.rmtree(testdir)
-            unlink(symlink_dst)
+            symlink_dst.unlink(missing_ok=True)
 
 
 @pytest.fixture(scope="module")