1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Replace distutils by packaging
Bug-Debian: https://bugs.debian.org/1056494
Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 15 Jan 2024 20:39:51 +0100
--- a/testing/log/test_warning.py
+++ b/testing/log/test_warning.py
@@ -1,5 +1,5 @@
import sys
-from distutils.version import LooseVersion
+import packaging.version
import pytest
@@ -8,7 +8,7 @@ import py
mypath = py.path.local(__file__).new(ext=".py")
-pytestmark = pytest.mark.skipif(LooseVersion(pytest.__version__) >= LooseVersion('3.1'),
+pytestmark = pytest.mark.skipif(packaging.version.Version(pytest.__version__) >= packaging.version.Version('3.1'),
reason='apiwarn is not compatible with pytest >= 3.1 (#162)')
|