summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Goergens <matthias.goergens@gmail.com>2023-04-11 19:08:40 +0800
committerNikolaus Rath <Nikolaus@rath.org>2023-04-11 13:32:00 +0100
commiteb88309882e0d88b726d0b1c3f4fb1ee7f56bd39 (patch)
tree989354ce8c60042825c4b134aba03372a0702b72
parent04215e9a9018910a21702c8fb4cc51d95f2f5eef (diff)
downloadfuse-eb88309882e0d88b726d0b1c3f4fb1ee7f56bd39.tar.gz
Migrate away from deprecated distutils
Before: ``` =============================== warnings summary =============================== test/test_ctests.py:12 /tmp/libfuse-build-mB50ZC/build-gcc-9/test/test_ctests.py:12: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.version import LooseVersion -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ```
-rwxr-xr-xtest/ci-install.sh2
-rw-r--r--test/test_ctests.py2
-rwxr-xr-xtest/test_examples.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/ci-install.sh b/test/ci-install.sh
index a4f273b..2d7b517 100755
--- a/test/ci-install.sh
+++ b/test/ci-install.sh
@@ -3,7 +3,7 @@
set -e
sudo python3 -m pip install --upgrade pip
-sudo python3 -m pip install pytest meson==1.0.1
+sudo python3 -m pip install pytest meson==1.0.1 looseversion
valgrind --version
ninja --version
meson --version
diff --git a/test/test_ctests.py b/test/test_ctests.py
index 63728c3..951a34b 100644
--- a/test/test_ctests.py
+++ b/test/test_ctests.py
@@ -9,7 +9,7 @@ import subprocess
import pytest
import platform
import sys
-from distutils.version import LooseVersion
+from looseversion import LooseVersion
from util import (wait_for_mount, umount, cleanup, base_cmdline,
safe_sleep, basename, fuse_test_marker, fuse_caps,
fuse_proto)
diff --git a/test/test_examples.py b/test/test_examples.py
index 7df9ba4..a7ba998 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -18,7 +18,7 @@ import time
import errno
import sys
import platform
-from distutils.version import LooseVersion
+from looseversion import LooseVersion
from tempfile import NamedTemporaryFile
from contextlib import contextmanager
from util import (wait_for_mount, umount, cleanup, base_cmdline,