distutils is deprecated in Python 3.10 #1923

This commit is contained in:
nicolargo 2021-08-29 10:37:25 +02:00
parent a47cfafdaf
commit 5b5cb1ceea
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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"""

View File

@ -1,3 +1,4 @@
psutil>=5.3.0
defusedxml
future
packaging