1.1 --- a/importer.py Fri Sep 09 19:31:16 2016 +0200
1.2 +++ b/importer.py Fri Sep 09 22:08:50 2016 +0200
1.3 @@ -388,8 +388,10 @@
1.4
1.5 # Make this module required in the accessing module.
1.6
1.7 - else:
1.8 + elif provider not in self.required:
1.9 self.required.add(provider)
1.10 + if self.verbose:
1.11 + print >>sys.stderr, "Requiring", provider, "for", ref
1.12
1.13 # Check modules again to see if they are now required and should now
1.14 # cause the inclusion of other modules providing objects to the program.
1.15 @@ -408,6 +410,8 @@
1.16 for provider in self.waiting[module_name]:
1.17 if provider not in self.required:
1.18 self.required.add(provider)
1.19 + if self.verbose:
1.20 + print >>sys.stderr, "Requiring", provider
1.21 self.require_providers(provider)
1.22
1.23 def find_dependency(self, ref):
1.24 @@ -640,9 +644,6 @@
1.25
1.26 # Otherwise, modules are loaded.
1.27
1.28 - if self.verbose:
1.29 - print >>sys.stderr, "Loading", name
1.30 -
1.31 # Split the name into path components, and try to find the uppermost in
1.32 # the search path.
1.33
1.34 @@ -751,10 +752,8 @@
1.35 # Load the module.
1.36
1.37 if self.verbose:
1.38 - print >>sys.stderr, "Loading", filename
1.39 + print >>sys.stderr, module_name in self.required and "Required" or "Loading", module_name, "from", filename
1.40 fn(module)(filename)
1.41 - if self.verbose:
1.42 - print >>sys.stderr, "Loaded", filename
1.43
1.44 def add_module(self, module_name, module):
1.45