提交 5b5cb1ce 编写于 作者: N nicolargo

distutils is deprecated in Python 3.10 #1923

上级 a47cfafd
......@@ -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
......
......@@ -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"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册