mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +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
|
@ -2,6 +2,7 @@
|
|||
from importlib import _bootstrap
|
||||
from .. import util
|
||||
from . import util as source_util
|
||||
import imp
|
||||
import os
|
||||
import sys
|
||||
from test import support as test_support
|
||||
|
@ -19,9 +20,13 @@ class CaseSensitivityTest(unittest.TestCase):
|
|||
assert name != name.lower()
|
||||
|
||||
def find(self, path):
|
||||
finder = _bootstrap._FileFinder(path,
|
||||
_bootstrap._SourceFinderDetails(),
|
||||
_bootstrap._SourcelessFinderDetails())
|
||||
finder = _bootstrap.FileFinder(path,
|
||||
(_bootstrap.SourceFileLoader,
|
||||
_bootstrap._suffix_list(imp.PY_SOURCE),
|
||||
True),
|
||||
(_bootstrap._SourcelessFileLoader,
|
||||
_bootstrap._suffix_list(imp.PY_COMPILED),
|
||||
True))
|
||||
return finder.find_module(self.name)
|
||||
|
||||
def sensitivity_test(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue