From: Steve Sakoman <steve@sakoman.com>
To: bitbake-devel@lists.openembedded.org
Subject: [bitbake][dunfell][1.46][PATCH 2/8] bitbake: correct the collections vs collections.abc deprecation
Date: Tue, 19 Oct 2021 10:06:10 -1000 [thread overview]
Message-ID: <655e53d7639fd17e8cc306dcee024222aa1effad.1634673786.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1634673786.git.steve@sakoman.com>
From: Alexander Kanavin <alex.kanavin@gmail.com>
This becomes a hard error in python 3.10.
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>
---
lib/bb/data_smart.py | 2 +-
lib/bb/persist_data.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 68770832..c8d2a437 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -17,7 +17,7 @@ BitBake build tools.
# Based on functions from the base bb module, Copyright 2003 Holger Schurig
import copy, re, sys, traceback
-from collections import MutableMapping
+from collections.abc import MutableMapping
import logging
import hashlib
import bb, bb.codeparser
diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py
index 5f4fbe35..56c983f8 100644
--- a/lib/bb/persist_data.py
+++ b/lib/bb/persist_data.py
@@ -12,6 +12,7 @@ currently, providing a key/value store accessed by 'domain'.
#
import collections
+import collections.abc
import contextlib
import functools
import logging
@@ -19,7 +20,7 @@ import os.path
import sqlite3
import sys
import warnings
-from collections import Mapping
+from collections.abc import Mapping
sqlversion = sqlite3.sqlite_version_info
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):
logger = logging.getLogger("BitBake.PersistData")
@functools.total_ordering
-class SQLTable(collections.MutableMapping):
+class SQLTable(collections.abc.MutableMapping):
class _Decorators(object):
@staticmethod
def retry(*, reconnect=True):
--
2.25.1
next prev parent reply other threads:[~2021-10-19 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 20:06 [bitbake][dunfell][1.46][PATCH 0/8] Patch review Steve Sakoman
2021-10-19 20:06 ` [bitbake][dunfell][1.46][PATCH 1/8] compat.py: remove file since it no longer actually implements anything Steve Sakoman
2021-10-19 20:06 ` Steve Sakoman [this message]
2021-10-19 20:06 ` [bitbake][dunfell][1.46][PATCH 3/8] bitbake: fix regexp deprecation warnings Steve Sakoman
2021-10-19 20:06 ` [bitbake][dunfell][1.46][PATCH 4/8] bitbake: do not import imp in layerindexlib Steve Sakoman
2021-10-19 20:06 ` [bitbake][dunfell][1.46][PATCH 5/8] bitbake: adjust parser error check for python 3.10 compatibility Steve Sakoman
2021-10-19 20:06 ` [bitbake][dunfell][1.46][PATCH 6/8] bitbake: correct deprecation warning in process.py Steve Sakoman
2021-10-19 20:06 ` [bitbake][dunfell][1.46][PATCH 7/8] test/fetch: Update urls to match upstream branch name changes Steve Sakoman
2021-10-19 20:06 ` [bitbake][dunfell][1.46][PATCH 8/8] hashserv: let asyncio discover the running loop Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=655e53d7639fd17e8cc306dcee024222aa1effad.1634673786.git.steve@sakoman.com \
--to=steve@sakoman.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).