1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-04 14:10:01 +00:00

gem5/gem5: fix the build with Python 3.10

gem5 imported collections.Mapping, but this was deprecated in 3.3 and
removed in 3.10.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2021-11-05 10:43:16 +00:00
committed by Jon Mason
parent a214398d13
commit 77b2b5eff7
2 changed files with 39 additions and 1 deletions
@@ -0,0 +1,37 @@
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@arm.com>
From 89958f7f30ec722e30e1bcffdeab547c874fa475 Mon Sep 17 00:00:00 2001
From: Adrian Herrera <adrian.herrera@arm.com>
Date: Mon, 15 Mar 2021 13:14:44 +0000
Subject: [PATCH] python: debug, fix Mapping import
Change "collections.Mapping" to "collections.abc.Mapping".
"collections.Mapping" was an alias, it is deprecated starting from Python 3.3, and it will be removed in Python 3.10.
Change-Id: Ic257e3c5206eb3d48d4eed85a93fac48bd3b8dc4
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43023
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
---
src/python/m5/debug.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python/m5/debug.py b/src/python/m5/debug.py
index d808850cc..787a39ece 100644
--- a/src/python/m5/debug.py
+++ b/src/python/m5/debug.py
@@ -24,7 +24,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from collections import Mapping
+from collections.abc import Mapping
import _m5.debug
from _m5.debug import SimpleFlag, CompoundFlag
--
2.25.1
@@ -1,7 +1,8 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \
file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec"
SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;nobranch=1"
SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;nobranch=1 \
file://mapping.patch"
RELEASE_TAG = "v20.1.0.5"
SRCREV = "31cd81fdec46bae4b48d4f3788776936389dbdec"