Skip to content

Commit

Permalink
Prefer packaging.version over pkg_resources
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hroncok authored and TurboTurtle committed Oct 16, 2023
1 parent 629b132 commit 5690401
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sos/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5690401

Please sign in to comment.