mirror of
https://github.com/python/cpython.git
synced 2025-10-23 18:03:48 +00:00
Issue #14605: Expose importlib.abc.FileLoader and
importlib.machinery.(FileFinder, SourceFileLoader, _SourcelessFileLoader, ExtensionFileLoader). This exposes all of importlib's mechanisms that will become public on the sys module.
This commit is contained in:
parent
8c5e920ae3
commit
938d44d59c
17 changed files with 3246 additions and 3076 deletions
|
@ -35,7 +35,7 @@ def run_test(self, source):
|
|||
with source_util.create_modules(self.module_name) as mapping:
|
||||
with open(mapping[self.module_name], 'wb') as file:
|
||||
file.write(source)
|
||||
loader = _bootstrap._SourceFileLoader(self.module_name,
|
||||
loader = _bootstrap.SourceFileLoader(self.module_name,
|
||||
mapping[self.module_name])
|
||||
return loader.load_module(self.module_name)
|
||||
|
||||
|
@ -97,7 +97,7 @@ def run_test(self, line_ending):
|
|||
with source_util.create_modules(module_name) as mapping:
|
||||
with open(mapping[module_name], 'wb') as file:
|
||||
file.write(source)
|
||||
loader = _bootstrap._SourceFileLoader(module_name,
|
||||
loader = _bootstrap.SourceFileLoader(module_name,
|
||||
mapping[module_name])
|
||||
return loader.load_module(module_name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue