All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gem5/gem5: fix the build with Python 3.10
@ 2021-11-05 10:43 Ross Burton
  0 siblings, 0 replies; only message in thread
From: Ross Burton @ 2021-11-05 10:43 UTC (permalink / raw)
  To: meta-arm

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>
---
 .../recipes-devtools/gem5/files/mapping.patch | 37 +++++++++++++++++++
 .../recipes-devtools/gem5/gem5-source_20.inc  |  3 +-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta-gem5/recipes-devtools/gem5/files/mapping.patch

diff --git a/meta-gem5/recipes-devtools/gem5/files/mapping.patch b/meta-gem5/recipes-devtools/gem5/files/mapping.patch
new file mode 100644
index 00000000..5eb34d82
--- /dev/null
+++ b/meta-gem5/recipes-devtools/gem5/files/mapping.patch
@@ -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
+
diff --git a/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc b/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc
index aafc54be..bf448fef 100644
--- a/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc
+++ b/meta-gem5/recipes-devtools/gem5/gem5-source_20.inc
@@ -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"
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-05 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 10:43 [PATCH] gem5/gem5: fix the build with Python 3.10 Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.