]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta: correct collections vs collections.abc deprecation
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 17 Sep 2021 12:59:19 +0000 (14:59 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Sep 2021 20:32:51 +0000 (21:32 +0100)
collections.abc is available since 3.3 and doesn't need special handling.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/maketype.py
scripts/lib/build_perf/report.py

index d929c8b3e5401926cfc0a0b27569e0f77ba3db25..d36082c5351f9c4bde5ec42b5373f9ab97a9d1c7 100644 (file)
@@ -10,12 +10,7 @@ the arguments of the type's factory for details.
 
 import inspect
 import oe.types as types
-try:
-    # Python 3.7+
-    from collections.abc import Callable
-except ImportError:
-    # Python < 3.7
-    from collections import Callable
+from collections.abc import Callable
 
 available_types = {}
 
index 4e8e2a8a9392dbc2313f5d117a105e153c711b1b..ab77424cc7453b1eb9f37fc682aff70b56d8ac06 100644 (file)
@@ -4,7 +4,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 """Handling of build perf test reports"""
-from collections import OrderedDict, Mapping, namedtuple
+from collections import OrderedDict, namedtuple
+from collections.abc import Mapping
 from datetime import datetime, timezone
 from numbers import Number
 from statistics import mean, stdev, variance