hgdemandimport/demandimportpy3.py
changeset 49729 7236f11db0c3
parent 49714 87516dd774d0
child 49927 e0c0545e2e55
equal deleted inserted replaced
49728:8a8005025d1c 49729:7236f11db0c3
    39 
    39 
    40     def exec_module(self, module):
    40     def exec_module(self, module):
    41         """Make the module load lazily."""
    41         """Make the module load lazily."""
    42         with tracing.log('demandimport %s', module):
    42         with tracing.log('demandimport %s', module):
    43             if _deactivated or module.__name__ in ignores:
    43             if _deactivated or module.__name__ in ignores:
       
    44                 # Reset the loader on the module as super() does (issue6725)
       
    45                 module.__spec__.loader = self.loader
       
    46                 module.__loader__ = self.loader
       
    47 
    44                 self.loader.exec_module(module)
    48                 self.loader.exec_module(module)
    45             else:
    49             else:
    46                 super().exec_module(module)
    50                 super().exec_module(module)
    47 
    51 
    48 
    52