diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-11-22 10:24:42 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-24 10:08:28 +0000 |
commit | 0d236d8fafe94dfece36bd305f0bac0464e0b5e2 (patch) | |
tree | 856179afecc392c4e164e4d07fd37602a105d012 | |
parent | fbd5ce2c50c7813675185b418ab53b170416ac25 (diff) | |
download | poky-0d236d8fafe94dfece36bd305f0bac0464e0b5e2.tar.gz |
bitbake: bitbake: correct the collections vs collections.abc deprecation
This becomes a hard error in python 3.10.
(Bitbake rev: 2805102e2a142c8e821519b651e4035353bbb717)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ae219e1f7460077f4492b31ac91cef4cf9b17277)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/cache.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 27eb271798..5f9c0a779d 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -19,7 +19,8 @@ | |||
19 | import os | 19 | import os |
20 | import logging | 20 | import logging |
21 | import pickle | 21 | import pickle |
22 | from collections import defaultdict, Mapping | 22 | from collections import defaultdict |
23 | from collections.abc import Mapping | ||
23 | import bb.utils | 24 | import bb.utils |
24 | from bb import PrefixLoggerAdapter | 25 | from bb import PrefixLoggerAdapter |
25 | import re | 26 | import re |
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 8291ca65e3..aa9ac2c8de 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -17,7 +17,7 @@ BitBake build tools. | |||
17 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 17 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
18 | 18 | ||
19 | import copy, re, sys, traceback | 19 | import copy, re, sys, traceback |
20 | from collections import MutableMapping | 20 | from collections.abc import MutableMapping |
21 | import logging | 21 | import logging |
22 | import hashlib | 22 | import hashlib |
23 | import bb, bb.codeparser | 23 | import bb, bb.codeparser |
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index c6a209fb3f..6f32d81afe 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py | |||
@@ -12,6 +12,7 @@ currently, providing a key/value store accessed by 'domain'. | |||
12 | # | 12 | # |
13 | 13 | ||
14 | import collections | 14 | import collections |
15 | import collections.abc | ||
15 | import contextlib | 16 | import contextlib |
16 | import functools | 17 | import functools |
17 | import logging | 18 | import logging |
@@ -19,7 +20,7 @@ import os.path | |||
19 | import sqlite3 | 20 | import sqlite3 |
20 | import sys | 21 | import sys |
21 | import warnings | 22 | import warnings |
22 | from collections import Mapping | 23 | from collections.abc import Mapping |
23 | 24 | ||
24 | sqlversion = sqlite3.sqlite_version_info | 25 | sqlversion = sqlite3.sqlite_version_info |
25 | if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3): | 26 | if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3): |
@@ -29,7 +30,7 @@ if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3): | |||
29 | logger = logging.getLogger("BitBake.PersistData") | 30 | logger = logging.getLogger("BitBake.PersistData") |
30 | 31 | ||
31 | @functools.total_ordering | 32 | @functools.total_ordering |
32 | class SQLTable(collections.MutableMapping): | 33 | class SQLTable(collections.abc.MutableMapping): |
33 | class _Decorators(object): | 34 | class _Decorators(object): |
34 | @staticmethod | 35 | @staticmethod |
35 | def retry(*, reconnect=True): | 36 | def retry(*, reconnect=True): |