From 5317347e5460a73bd811a094c3c6f7b1fc404125 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Sun, 17 May 2020 21:12:43 +0300 Subject: [PATCH] Avoid distutils.version.StrictVersion distutils.version is old code that predates PEP 440. We could add a dependency on https://packaging.pypa.io/en/latest/version/, but meh. --- linkcheck/updater.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linkcheck/updater.py b/linkcheck/updater.py index 336a6e92..d9bbdeb7 100644 --- a/linkcheck/updater.py +++ b/linkcheck/updater.py @@ -20,7 +20,7 @@ Function to check for updates. import os from .configuration import Version as CurrentVersion from .url import get_content -from distutils.version import StrictVersion +from distutils.version import LooseVersion # Use the Freecode submit file as source since that file gets updated # only when releasing a new version. @@ -72,4 +72,4 @@ def get_online_version(): def is_newer_version(version): """Check if given version is newer than current version.""" - return StrictVersion(version) > StrictVersion(CurrentVersion) + return LooseVersion(version) > LooseVersion(CurrentVersion)