From 0e31076e06537bb2597be5e849bfec3da66068c1 Mon Sep 17 00:00:00 2001 From: "Augusto F. Hack" Date: Wed, 23 Dec 2020 14:44:17 +0100 Subject: [PATCH 1/2] bpo-42726: gdb/libpython.py fix bug with py3 --- .../next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst | 2 ++ Tools/gdb/libpython.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst new file mode 100644 index 00000000000000..18142252098c11 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst @@ -0,0 +1,2 @@ +Fixed compatibility issue with gdb/libpython.py handling of attribute +dictionaries. diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index e6555dd96a373b..e18ab0d873cce9 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -468,7 +468,7 @@ def __init__(self, cl_name, attrdict, address): def __repr__(self): if isinstance(self.attrdict, dict): kwargs = ', '.join(["%s=%r" % (arg, val) - for arg, val in self.attrdict.iteritems()]) + for arg, val in self.attrdict.items()]) return '<%s(%s) at remote 0x%x>' % (self.cl_name, kwargs, self.address) else: From aa926b7ab064c9d6cd39214cb844cbbd66fe6299 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 24 Dec 2020 10:56:13 -0600 Subject: [PATCH 2/2] mention kind of compatibility issue --- .../next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst index 18142252098c11..01a6e7fe55f5b3 100644 --- a/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst +++ b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst @@ -1,2 +1,2 @@ -Fixed compatibility issue with gdb/libpython.py handling of attribute +Fixed Python 3 compatibility issue with gdb/libpython.py handling of attribute dictionaries.