From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> Distutils are deprecated. Use the Version class from packaging.version instead of LooseVersion from distutils.version. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> --- bindings/python/tests/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bindings/python/tests/__init__.py b/bindings/python/tests/__init__.py index a0f22ae..d6275bb 100644 --- a/bindings/python/tests/__init__.py +++ b/bindings/python/tests/__init__.py @@ -2,10 +2,11 @@ # SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@xxxxxxxx> import os -from distutils.version import LooseVersion -required_kernel_version = LooseVersion("5.19.0") -current_version = LooseVersion(os.uname().release.split("-")[0]) +from packaging.version import Version + +required_kernel_version = Version("5.19.0") +current_version = Version(os.uname().release.split("-")[0]) if current_version < required_kernel_version: raise NotImplementedError( -- 2.45.2