Message ID | 20241119144242.118764-1-brgl@bgdev.pl |
---|---|
State | New |
Headers | show |
Series | [libgpiod] bindings: python: tests: replace LooseVersion with packaging.version.Version | expand |
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@bgdev.pl> 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(