]> 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:34:23 +0000 (16:34 +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.

(cherry picked from commit ac8e2905b89d69318ef5351dbffcedcc2f8bdcf9)

bin/tests/system/conftest.py
configure.ac

index d0aaa2b63407be867d7022588cd23127e893f1f2..fe3e406367b2af85107b67716c8a6b5e06cb5ae1 100644 (file)
@@ -19,6 +19,7 @@ import subprocess
 import tempfile
 import time
 from typing import Dict, List, Optional
+import sys
 
 import pytest
 
@@ -30,6 +31,8 @@ import isctest
 # 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.")
 
 # ----------------------- Globals definition -----------------------------
 
@@ -409,12 +412,6 @@ def system_test_dir(request, env, 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):
@@ -459,7 +456,7 @@ def system_test_dir(request, env, 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)
@@ -508,7 +505,7 @@ def system_test_dir(request, env, 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")
index 125e31d26bf3bcf8d3ada893e77b6ddd56879410..300035968b02f72fc068269778d3e3ddfd0e5f97 100644 (file)
@@ -240,7 +240,7 @@ AM_CONDITIONAL([HAVE_PERL], [test -n "$PERL"])
 #
 # Python is optional, it is used only by some of the system test scripts.
 #
-AM_PATH_PYTHON([3.6], [], [:])
+AM_PATH_PYTHON([3.10], [], [:])
 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ":"])
 
 AC_PATH_PROGS([PYTEST], [pytest-3 py.test-3 pytest py.test pytest-pypy], [])