# HG changeset patch # User Paul Boddie # Date 1481931119 -3600 # Node ID eb07270f706105616723d76361cfa5ee111ebf71 # Parent 566bcacd81dba729e43f083e87a9af16c7f8809a Restored module-level non-static dependency identification (in addition to recently added mechanisms). diff -r 566bcacd81db -r eb07270f7061 importer.py --- a/importer.py Sat Dec 17 00:11:52 2016 +0100 +++ b/importer.py Sat Dec 17 00:31:59 2016 +0100 @@ -63,6 +63,10 @@ self.accessing_modules = {} self.invalidated = set() + # Object relationships and dependencies. + + self.depends = {} + # Basic program information. self.objects = {} @@ -400,7 +404,6 @@ "Resolve dependencies between modules." self.waiting = {} - self.depends = {} for module in self.modules.values(): @@ -456,6 +459,14 @@ if self.verbose: print >>sys.stderr, "Requiring", provider, "for", ref, "from", module.name + # Record a module ordering dependency. + + if not found.static(): + self.add_dependency(module.name, provider) + + # Restore the original references so that they may be read back in + # and produce the same results. + module.deferred = original_deferred # Check modules again to see if they are now required and should now @@ -528,6 +539,8 @@ init_item(self.depends, path, set) self.depends[path].add(origin) + # NOTE: Consolidate this information in a common location. + special_attributes = ("__args__", "__file__", "__fn__", "__fname__", "__mname__", "__name__") def is_dynamic_class(self, name):