Get rid of the classes RModuleLoader and RModuleImporter -- these were
only there to override reload() in a way that doesn't make a whole lot of sense and moreover broke since the latest changes in ihooks.
This commit is contained in:
parent
e3f8a64906
commit
f07029e4ba
19
Lib/rexec.py
19
Lib/rexec.py
|
@ -107,22 +107,9 @@ class RHooks(ihooks.Hooks):
|
||||||
return self.rexec.modules['sys'].path
|
return self.rexec.modules['sys'].path
|
||||||
|
|
||||||
|
|
||||||
class RModuleLoader(ihooks.FancyModuleLoader):
|
# XXX Backwards compatibility
|
||||||
|
RModuleLoader = ihooks.FancyModuleLoader
|
||||||
def load_module(self, name, stuff):
|
RModuleImporter = ihooks.ModuleImporter
|
||||||
file, filename, info = stuff
|
|
||||||
m = ihooks.FancyModuleLoader.load_module(self, name, stuff)
|
|
||||||
m.__filename__ = filename
|
|
||||||
return m
|
|
||||||
|
|
||||||
|
|
||||||
class RModuleImporter(ihooks.ModuleImporter):
|
|
||||||
|
|
||||||
def reload(self, module, path=None):
|
|
||||||
if path is None and hasattr(module, '__filename__'):
|
|
||||||
head, tail = os.path.split(module.__filename__)
|
|
||||||
path = [os.path.join(head, '')]
|
|
||||||
return ihooks.ModuleImporter.reload(self, module, path)
|
|
||||||
|
|
||||||
|
|
||||||
class RExec(ihooks._Verbose):
|
class RExec(ihooks._Verbose):
|
||||||
|
|
Loading…
Reference in New Issue