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 00000000000..01a6e7fe55f --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst @@ -0,0 +1,2 @@ +Fixed Python 3 compatibility issue with gdb/libpython.py handling of attribute +dictionaries. diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 33bf5ac821f..aeaa63e540d 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -468,7 +468,7 @@ class InstanceProxy(object): 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: