From 971e5e329290d8e5047ac85c6c85943dfadd5fe6 Mon Sep 17 00:00:00 2001 From: Petr Stodulka Date: Tue, 14 Apr 2026 11:25:01 +0200 Subject: [PATCH 41/44] python tests deps: update version requirements per python tl;dr; We haven't updated the requirements.txt file for a long time (basically since IPU 7 -> 8; if we do not count some minor updates). Let's update dependencies to use newer python modules for newer versions of python. * Pytest Originally we required pytest v6.2.5 for any python 3.6+. This is pretty old requirement coming from time of python ~ 3.8 and recently a CVE-2025-71176 occuared, which is fix in pytest v9.0.3. So let's update ranges to actually allow use of newer pytest on newer systems: +----------------+---------------+ | pytest version | python range | +----------------+---------------+ | 6.2.5 | 3.6.x - 3.7.x | | 7.4.4 | 3.8.x - 3.9.x | | 9.0.3 | 3.10+ | +----------------+---------------+ Note that Pytest 8.x is messing with imports which breaks leapp import handling unfortunately (race-condition). Seems that these problems are fixed for Pytest 9 with Python 3.10+. In case we figure out problems anyway, pytest will need to be executed with additional parameters to use old import style again. As there is no high demand for newer pytest on python 3.9, let's stick just with working pytest versions. * Pyudev The original v0.22 is used up to CS 9 (pyton 3.9-). Use 0.24.1 for python 3.10+ (reflects CS 10 as well) * Distro The original v1.5.0 can be used till CS 9 (python 3.9 included) safely as nowadays. Let's use version 1.9.0 for Python 3.10+ * Drop unsued dependencies (old python that is no longer supported in the project). --- requirements.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3c79b23d..e4294718 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,13 +5,14 @@ isort funcsigs==1.0.2 mock==2.0.0 pylint -pytest==4.6.11; python_version < '3.0' -pytest==6.2.5; python_version >= '3.6' -pyudev==0.22.0 -distro==1.5.0 +pytest==6.2.5; python_version >= '3.6' and python_version < '3.8' +pytest==7.4.4; python_version >= '3.8' and python_version < '3.10' +pytest==9.0.3; python_version >= '3.10' +pyudev==0.22.0; python_version < '3.10' +pyudev==0.24.1; python_version >= '3.10' +distro==1.5.0; python_version < '3.10' +distro==1.9.0; python_version >= '3.10' ipaddress==1.0.23 git+https://github.com/oamg/leapp requests -# pinning a py27 troublemaking transitive dependency -lazy-object-proxy==1.5.2; python_version < '3' rpm -- 2.53.0