summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/python_modules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:17 +0000
commit7877a98bd9c00db5e81dd2f8c734cba2bab20be7 (patch)
treed18b767250f7c7ced9b8abe2ece784ac1fe24d3e /collectors/python.d.plugin/python_modules
parentReleasing debian version 1.35.1-2. (diff)
downloadnetdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.tar.xz
netdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.zip
Merging upstream version 1.36.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/python_modules')
-rw-r--r--collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py5
-rw-r--r--collectors/python.d.plugin/python_modules/urllib3/_collections.py7
-rw-r--r--collectors/python.d.plugin/python_modules/urllib3/util/selectors.py8
3 files changed, 16 insertions, 4 deletions
diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py
index c304ccec2..ed1b2e669 100644
--- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py
+++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py
@@ -95,8 +95,9 @@ class SimpleService(PythonDLimitedLogger, object):
@property
def name(self):
- if self.job_name and self.job_name != self.module_name:
- return '_'.join([self.module_name, self.override_name or self.job_name])
+ name = self.override_name or self.job_name
+ if name and name != self.module_name:
+ return '_'.join([self.module_name, name])
return self.module_name
def actual_name(self):
diff --git a/collectors/python.d.plugin/python_modules/urllib3/_collections.py b/collectors/python.d.plugin/python_modules/urllib3/_collections.py
index c1d2fad36..2a6b3ec70 100644
--- a/collectors/python.d.plugin/python_modules/urllib3/_collections.py
+++ b/collectors/python.d.plugin/python_modules/urllib3/_collections.py
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: MIT
from __future__ import absolute_import
-from collections import Mapping, MutableMapping
+
+try:
+ from collections import Mapping, MutableMapping
+except ImportError:
+ from collections.abc import Mapping, MutableMapping
+
try:
from threading import RLock
except ImportError: # Platform-specific: No threads available
diff --git a/collectors/python.d.plugin/python_modules/urllib3/util/selectors.py b/collectors/python.d.plugin/python_modules/urllib3/util/selectors.py
index c0997b1a2..de5e49838 100644
--- a/collectors/python.d.plugin/python_modules/urllib3/util/selectors.py
+++ b/collectors/python.d.plugin/python_modules/urllib3/util/selectors.py
@@ -12,7 +12,13 @@ import select
import socket
import sys
import time
-from collections import namedtuple, Mapping
+
+from collections import namedtuple
+
+try:
+ from collections import Mapping
+except ImportError:
+ from collections.abc import Mapping
try:
monotonic = time.monotonic