1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

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>
This commit is contained in:
Alexander Kanavin
2021-09-16 22:22:33 +02:00
committed by Richard Purdie
parent 3891a56a78
commit 5c24982cc9
3 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -19,7 +19,8 @@
import os import os
import logging import logging
import pickle import pickle
from collections import defaultdict, Mapping from collections import defaultdict
from collections.abc import Mapping
import bb.utils import bb.utils
from bb import PrefixLoggerAdapter from bb import PrefixLoggerAdapter
import re import re
+1 -1
View File
@@ -17,7 +17,7 @@ BitBake build tools.
# Based on functions from the base bb module, Copyright 2003 Holger Schurig # Based on functions from the base bb module, Copyright 2003 Holger Schurig
import copy, re, sys, traceback import copy, re, sys, traceback
from collections import MutableMapping from collections.abc import MutableMapping
import logging import logging
import hashlib import hashlib
import bb, bb.codeparser import bb, bb.codeparser
+3 -2
View File
@@ -12,13 +12,14 @@ currently, providing a key/value store accessed by 'domain'.
# #
import collections import collections
import collections.abc
import contextlib import contextlib
import functools import functools
import logging import logging
import os.path import os.path
import sqlite3 import sqlite3
import sys import sys
from collections import Mapping from collections.abc import Mapping
sqlversion = sqlite3.sqlite_version_info sqlversion = sqlite3.sqlite_version_info
if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3): if 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):
logger = logging.getLogger("BitBake.PersistData") logger = logging.getLogger("BitBake.PersistData")
@functools.total_ordering @functools.total_ordering
class SQLTable(collections.MutableMapping): class SQLTable(collections.abc.MutableMapping):
class _Decorators(object): class _Decorators(object):
@staticmethod @staticmethod
def retry(*, reconnect=True): def retry(*, reconnect=True):