# HG changeset patch # User Paul Boddie # Date 1478798357 -3600 # Node ID f9cd0d5c92d5e8ceca08e513ebde82568446e9b8 # Parent 873a71917910ec1c6f1c21241ecfa320ce0321f9 Always make names imported from modules deferred. diff -r 873a71917910 -r f9cd0d5c92d5 inspector.py --- a/inspector.py Thu Nov 10 17:05:38 2016 +0100 +++ b/inspector.py Thu Nov 10 18:19:17 2016 +0100 @@ -794,7 +794,6 @@ # Attempt to get a reference. ref = self.import_name_from_module(op, "operator") - self.add_deferred(ref) # Record the imported name and provide the resolved name reference. diff -r 873a71917910 -r f9cd0d5c92d5 modules.py --- a/modules.py Thu Nov 10 17:05:38 2016 +0100 +++ b/modules.py Thu Nov 10 18:19:17 2016 +0100 @@ -327,7 +327,9 @@ if module_name != self.name: self.queue_module(module_name) - return Reference("", "%s.%s" % (module_name, name)) + ref = Reference("", "%s.%s" % (module_name, name)) + self.deferred.append(ref) + return ref def add_deferred(self, ref):