summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-12-24 17:34:28 (GMT)
committerGitHub <noreply@github.com>2020-12-24 17:34:28 (GMT)
commitefd64c8ea0fed1c13839cec0feea450820da34f8 (patch)
tree1f38aa4f828da2049e52c062176de40ef41dab25 /Tools
parent412c935a37eb8fe290b684c44c80cf361f6b814b (diff)
downloadcpython-efd64c8ea0fed1c13839cec0feea450820da34f8.zip
cpython-efd64c8ea0fed1c13839cec0feea450820da34f8.tar.gz
cpython-efd64c8ea0fed1c13839cec0feea450820da34f8.tar.bz2
closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)
On Fedora 31 gdb is using python 3.7.9, calling `proxyval` on an instance with a dictionary fails because of the `dict.iteritems` usage. This PR changes the code to be compatible with py2 and py3. This changed seemed small enough to not need an issue and news blurb, if one is required please let me know. Automerge-Triggered-By: GH:benjaminp (cherry picked from commit b57ada98da0d5b0cf1ebc2c9c5502d04aa962042) Co-authored-by: Augusto Hack <hack.augusto@gmail.com>
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/gdb/libpython.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index ffb1813..aa674f6 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: