From 56904018045fdbdad666e55f0a850bc365809e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 13 Oct 2023 16:09:30 +0200 Subject: [PATCH] Prefer packaging.version over pkg_resources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pkg_resources bundle and call packaging.version internally anyway. In RHEL 10 and Ubuntu, we have packaging in BaseOS/main. I hereby declare that you can do whatever you want with this commit: Signed-off-by: Miro HronĨok --- sos/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sos/utilities.py b/sos/utilities.py index 03a4a7b6e6..d56afe28cf 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -23,9 +23,9 @@ from collections import deque try: - from pkg_resources import parse_version -except ImportError: from packaging.version import parse as parse_version +except ImportError: + from pkg_resources import parse_version # try loading magic>=0.4.20 which implements detect_from_filename method magic_mod = False