leapp-repository/0041-python-tests-deps-update-version-requirements-per-py.patch
Matej Matuska 6dd428e9cc IPU 8.10 -> 9.9: CTC1 candidate 1
- Introduce new upgrade paths 8.10 -> 9.9
- Requires leapp-framework 6.5+
- Modify keys for several reports that have been inconsistent between major releases. The keys are now independent of the used upgrade path.
- Enable the logrotate timer automatically
- Fix AVC SELinux warnings caused by leapp execution
- Fix the upgrade with LiveMode on systems with FIPS
- Livemode: Fix the upgrade on systems where the generated live image is not in rootfs
- Fix failing upgrades with hugetlbfs file systems specified in FSTAB
- Fix scan of physical network interfaces and ethX detection
- Fix detection of network interfaces with biosdevname naming on Dell machines
- Fix quoting in list representation of remediation commands
- Consider RHUI source clients as signed by distribution vendor
- Ensure that greenboot packages are removed during the upgrade
- Respect names of distributions used for the IPU in preupgrade reports
- Minor updates in reports
- Regenerate GRUB2 config during conversions
- Update leapp data files
- Introduce DISTRO_REPORT_NAMES in the distro library to provide unified names for linux distributions for the use in leapp reports
- Resolves: RHEL-3370, RHEL-17361, RHEL-104379, RHEL-110712, RHEL-129571, RHEL-130948
2026-04-22 14:53:16 +02:00

76 lines
2.7 KiB
Diff

From 971e5e329290d8e5047ac85c6c85943dfadd5fe6 Mon Sep 17 00:00:00 2001
From: Petr Stodulka <pstodulk@redhat.com>
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