summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-09-16 22:22:33 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-17 07:26:23 +0100
commit5c24982cc935488535251237f9e2fd097a134112 (patch)
treeb27d8cd8c92cf98ee22d4c7b3f32d17bad9ef227
parent3891a56a78c78e6c5fb36431a0f15e7085aa9275 (diff)
downloadpoky-5c24982cc935488535251237f9e2fd097a134112.tar.gz
bitbake: bitbake: correct the collections vs collections.abc deprecation
This becomes a hard error in python 3.10. (Bitbake rev: ae219e1f7460077f4492b31ac91cef4cf9b17277) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/cache.py3
-rw-r--r--bitbake/lib/bb/data_smart.py2
-rw-r--r--bitbake/lib/bb/persist_data.py5
3 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 73bc6e9665..4e08c100ab 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -19,7 +19,8 @@
19import os 19import os
20import logging 20import logging
21import pickle 21import pickle
22from collections import defaultdict, Mapping 22from collections import defaultdict
23from collections.abc import Mapping
23import bb.utils 24import bb.utils
24from bb import PrefixLoggerAdapter 25from bb import PrefixLoggerAdapter
25import re 26import re
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index e4afac64b2..73e33ee10e 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
19import copy, re, sys, traceback 19import copy, re, sys, traceback
20from collections import MutableMapping 20from collections.abc import MutableMapping
21import logging 21import logging
22import hashlib 22import hashlib
23import bb, bb.codeparser 23import bb, bb.codeparser
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index 286cc0a99d..49c9a0d510 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -12,13 +12,14 @@ currently, providing a key/value store accessed by 'domain'.
12# 12#
13 13
14import collections 14import collections
15import collections.abc
15import contextlib 16import contextlib
16import functools 17import functools
17import logging 18import logging
18import os.path 19import os.path
19import sqlite3 20import sqlite3
20import sys 21import sys
21from collections import Mapping 22from collections.abc import Mapping
22 23
23sqlversion = sqlite3.sqlite_version_info 24sqlversion = sqlite3.sqlite_version_info
24if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3): 25if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
@@ -28,7 +29,7 @@ if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
28logger = logging.getLogger("BitBake.PersistData") 29logger = logging.getLogger("BitBake.PersistData")
29 30
30@functools.total_ordering 31@functools.total_ordering
31class SQLTable(collections.MutableMapping): 32class SQLTable(collections.abc.MutableMapping):
32 class _Decorators(object): 33 class _Decorators(object):
33 @staticmethod 34 @staticmethod
34 def retry(*, reconnect=True): 35 def retry(*, reconnect=True):