diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-10-19 10:06:10 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-23 17:47:38 +0100 |
commit | 3e3434ee1022158a397af870090151e9988a9e9b (patch) | |
tree | a5fbdf70abedd3ec6ff4b852c01ef8c6869c4a7c /bitbake | |
parent | c35f34361e94a81660c6e1f59d770f8a165e7f53 (diff) | |
download | poky-3e3434ee1022158a397af870090151e9988a9e9b.tar.gz |
bitbake: bitbake: correct the collections vs collections.abc deprecation
This becomes a hard error in python 3.10.
(Bitbake rev: 4b66d498eab22eca29c9e3a7fdfa5c6e54055e78)
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: Justin Bronder <jsbronder@cold-front.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 68770832e0..c8d2a43724 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 5f4fbe3508..56c983f816 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): |