--- a/src/eric7/DebugClients/Python/FlexCompleter.py Sat Nov 09 17:23:04 2024 +0100 +++ b/src/eric7/DebugClients/Python/FlexCompleter.py Sun Nov 10 15:21:04 2024 +0100 @@ -51,6 +51,7 @@ import builtins import keyword import re +import sys import __main__ @@ -82,8 +83,8 @@ @exception TypeError raised to indicate a wrong data structure of the namespace object """ - if namespace and not isinstance(namespace, dict): - raise TypeError("namespace must be a dictionary") + if namespace and not isinstance(namespace, (dict, sys._getframe().f_locals.__class__)): + raise TypeError("namespace must be a dictionary or since 3.13 a FrameLocalsProxy") # Don't bind to namespace quite yet, but flag whether the user wants a # specific namespace or to use __main__.__dict__. This will allow us @@ -202,7 +203,7 @@ words = set(dir(thisobject)) words.discard("__builtins__") - if hasattr(object, "__class__"): + if hasattr(thisobject, "__class__"): words.add("__class__") words.update(get_class_members(thisobject.__class__)) matches = []