diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-08-29 10:37:25 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-08-29 10:37:25 +0200 |
commit | 5b5cb1ceea570a55718ea7a2937d34047f1fc9ed (patch) | |
tree | 9f5f716c7027d46e63084bb9bb53e9fe3ecbbbcb | |
parent | a47cfafdafe7a9e35a74ad08b36cd209c3d0a7de (diff) |
distutils is deprecated in Python 3.10 #1923
-rw-r--r-- | conf/glances.conf | 2 | ||||
-rw-r--r-- | glances/outdated.py | 4 | ||||
-rw-r--r-- | requirements.txt | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/conf/glances.conf b/conf/glances.conf index c04f8e96..57478e28 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -8,7 +8,7 @@ # It is also possible to overwrite it in each plugin sections refresh=2 # Does Glances should check if a newer version is available on PyPI ? -check_update=false +check_update=true # History size (maximum number of values) # Default is 3600 seconds (1 hour) history_size=3600 diff --git a/glances/outdated.py b/glances/outdated.py index 0b06e1e7..31accacb 100644 --- a/glances/outdated.py +++ b/glances/outdated.py @@ -20,7 +20,7 @@ """Manage Glances update.""" from datetime import datetime, timedelta -from distutils.version import LooseVersion +from packaging.version import Version import threading import json import pickle @@ -113,7 +113,7 @@ class Outdated(object): return False logger.debug("Check Glances version (installed: {} / latest: {})".format(self.installed_version(), self.latest_version())) - return LooseVersion(self.latest_version()) > LooseVersion(self.installed_version()) + return Version(self.latest_version()) > Version(self.installed_version()) def _load_cache(self): """Load cache file and return cached data""" diff --git a/requirements.txt b/requirements.txt index db8f5c38..5d79e3d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ psutil>=5.3.0 defusedxml future +packaging
\ No newline at end of file |