]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
REST: Remove use of deprecated distuils classes
authorStephen Finucane <stephen@that.guru>
Tue, 22 Feb 2022 17:34:50 +0000 (17:34 +0000)
committerStephen Finucane <stephen@that.guru>
Tue, 22 Feb 2022 17:34:50 +0000 (17:34 +0000)
Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/api/utils.py

index 7d46e8465c8a70563cbc722c0ed6684f3f7a4f46..fc3befcda8b8b1392a8ab799e0513381e0acadb6 100644 (file)
@@ -3,7 +3,9 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-from distutils.version import StrictVersion
+
+def _parse_version(version):
+    return version.split('.')
 
 
 def has_version(request, version):
@@ -11,4 +13,4 @@ def has_version(request, version):
         # without version information, we have to assume the latest
         return True
 
-    return StrictVersion(request.version) >= StrictVersion(version)
+    return _parse_version(request.version) >= _parse_version(version)