mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Finish properly hiding importlib implementation code.
This commit is contained in:
parent
e9103d2619
commit
f87e04d339
12 changed files with 43 additions and 55 deletions
|
@ -1,4 +1,4 @@
|
|||
import importlib
|
||||
from importlib import _bootstrap
|
||||
from . import util as source_util
|
||||
|
||||
import codecs
|
||||
|
@ -35,7 +35,7 @@ class EncodingTest(unittest.TestCase):
|
|||
with source_util.create_modules(self.module_name) as mapping:
|
||||
with open(mapping[self.module_name], 'wb')as file:
|
||||
file.write(source)
|
||||
loader = importlib.PyPycFileLoader(self.module_name,
|
||||
loader = _bootstrap._PyPycFileLoader(self.module_name,
|
||||
mapping[self.module_name], False)
|
||||
return loader.load_module(self.module_name)
|
||||
|
||||
|
@ -96,8 +96,8 @@ class LineEndingTest(unittest.TestCase):
|
|||
with source_util.create_modules(module_name) as mapping:
|
||||
with open(mapping[module_name], 'wb') as file:
|
||||
file.write(source)
|
||||
loader = importlib.PyPycFileLoader(module_name, mapping[module_name],
|
||||
False)
|
||||
loader = _bootstrap._PyPycFileLoader(module_name,
|
||||
mapping[module_name], False)
|
||||
return loader.load_module(module_name)
|
||||
|
||||
# [cr]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue