Make the variable view and filter consistent between Python2 and Python3.

Tue, 25 Oct 2016 21:45:20 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Tue, 25 Oct 2016 21:45:20 +0200
changeset 5272
5684dd6667e6
parent 5271
ac9d134b457a
child 5273
be55746da9d1

Make the variable view and filter consistent between Python2 and Python3.

DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
DebugClients/Python/DebugConfig.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugClientBase.py	Tue Oct 25 19:33:43 2016 +0200
+++ b/DebugClients/Python/DebugClientBase.py	Tue Oct 25 21:45:20 2016 +0200
@@ -1684,13 +1684,17 @@
                     elif ConfigVarTypeStrings.index('instance') in filter:
                         continue
                     
-                    if valtypename not in ["ndarray", "MultiValueDict",
-                                           "array"]:
+                    if (not valtypestr.startswith('type ') and 
+                            valtypename not in
+                            ["ndarray", "MultiValueDict", "array"]):
                         valtype = valtypestr
                 else:
                     try:
                         if ConfigVarTypeStrings.index(valtype) in filter:
                             continue
+                        # Strip 'instance' to be equal with Python 3
+                        if valtype == "instancemethod":
+                            valtype = "method"
                     except ValueError:
                         if valtype == "classobj":
                             if ConfigVarTypeStrings.index(
--- a/DebugClients/Python/DebugConfig.py	Tue Oct 25 19:33:43 2016 +0200
+++ b/DebugClients/Python/DebugConfig.py	Tue Oct 25 21:45:20 2016 +0200
@@ -15,7 +15,7 @@
     'bool', 'int', 'long', 'float', 'complex',
     'str', 'unicode', 'tuple', 'list',
     'dict', 'dict-proxy', 'set', 'file', 'xrange',
-    'slice', 'buffer', 'class', 'instance',
+    'slice', 'buffer', 'class', 'instance', 'instancemethod',
     'method', 'property', 'generator',
     'function', 'builtin_function_or_method', 'code', 'module',
     'ellipsis', 'traceback', 'frame', 'other', 'frozenset'

eric ide

mercurial