summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMarc-Andre Lemburg <mal@egenix.com>2012-04-25 00:31:37 (GMT)
committerMarc-Andre Lemburg <mal@egenix.com>2012-04-25 00:31:37 (GMT)
commit4fe29c9657d64e8e3301122c104b7ca8fd23c348 (patch)
treef04a51eef51805eacccaa931e0d9ba4bec9ecb51 /Lib
parentac8805a01a0beeb4c5b2f6d9d988629446517632 (diff)
downloadcpython-4fe29c9657d64e8e3301122c104b7ca8fd23c348.zip
cpython-4fe29c9657d64e8e3301122c104b7ca8fd23c348.tar.gz
cpython-4fe29c9657d64e8e3301122c104b7ca8fd23c348.tar.bz2
Issue #14605: Rename _SourcelessFileLoader to SourcelessFileLoader.
This time also recreating the Python/importlib.h file to make make happy. See the ticket for details.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/imp.py2
-rw-r--r--Lib/importlib/_bootstrap.py4
-rw-r--r--Lib/importlib/abc.py2
-rw-r--r--Lib/importlib/machinery.py2
-rw-r--r--Lib/importlib/test/source/test_case_sensitivity.py2
-rw-r--r--Lib/importlib/test/source/test_file_loader.py2
-rw-r--r--Lib/importlib/test/source/test_finder.py2
-rw-r--r--Lib/importlib/test/test_abc.py2
8 files changed, 9 insertions, 9 deletions
diff --git a/Lib/imp.py b/Lib/imp.py
index f35247c..0388d08 100644
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -94,7 +94,7 @@ def load_source(name, pathname, file=None):
class _LoadCompiledCompatibility(_HackedGetData,
- _bootstrap._SourcelessFileLoader):
+ _bootstrap.SourcelessFileLoader):
"""Compatibility support for implementing load_compiled()."""
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index d9df2b7..817fe39 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -671,7 +671,7 @@ class SourceFileLoader(FileLoader, SourceLoader):
pass
-class _SourcelessFileLoader(FileLoader, _LoaderBasics):
+class SourcelessFileLoader(FileLoader, _LoaderBasics):
"""Loader which handles sourceless file imports."""
@@ -1198,7 +1198,7 @@ def _setup(sys_module, _imp_module):
supported_loaders = [(ExtensionFileLoader, _suffix_list(3), False),
(SourceFileLoader, _suffix_list(1), True),
- (_SourcelessFileLoader, _suffix_list(2), True)]
+ (SourcelessFileLoader, _suffix_list(2), True)]
setattr(self_module, '_DEFAULT_PATH_HOOK',
FileFinder.path_hook(*supported_loaders))
diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
index baa09fd..c171da3 100644
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -119,7 +119,7 @@ class FileLoader(_bootstrap.FileLoader, ResourceLoader, ExecutionLoader):
ExecutionLoader ABCs."""
_register(FileLoader, machinery.SourceFileLoader,
- machinery._SourcelessFileLoader)
+ machinery.SourcelessFileLoader)
class SourceLoader(_bootstrap.SourceLoader, ResourceLoader, ExecutionLoader):
diff --git a/Lib/importlib/machinery.py b/Lib/importlib/machinery.py
index c9906c7..07465ce 100644
--- a/Lib/importlib/machinery.py
+++ b/Lib/importlib/machinery.py
@@ -5,5 +5,5 @@ from ._bootstrap import FrozenImporter
from ._bootstrap import PathFinder
from ._bootstrap import FileFinder
from ._bootstrap import SourceFileLoader
-from ._bootstrap import _SourcelessFileLoader
+from ._bootstrap import SourcelessFileLoader
from ._bootstrap import ExtensionFileLoader
diff --git a/Lib/importlib/test/source/test_case_sensitivity.py b/Lib/importlib/test/source/test_case_sensitivity.py
index d4bae8d..f65f285 100644
--- a/Lib/importlib/test/source/test_case_sensitivity.py
+++ b/Lib/importlib/test/source/test_case_sensitivity.py
@@ -24,7 +24,7 @@ class CaseSensitivityTest(unittest.TestCase):
(_bootstrap.SourceFileLoader,
_bootstrap._suffix_list(imp.PY_SOURCE),
True),
- (_bootstrap._SourcelessFileLoader,
+ (_bootstrap.SourcelessFileLoader,
_bootstrap._suffix_list(imp.PY_COMPILED),
True))
return finder.find_module(self.name)
diff --git a/Lib/importlib/test/source/test_file_loader.py b/Lib/importlib/test/source/test_file_loader.py
index 764dcff..c4c7545 100644
--- a/Lib/importlib/test/source/test_file_loader.py
+++ b/Lib/importlib/test/source/test_file_loader.py
@@ -379,7 +379,7 @@ class SourceLoaderBadBytecodeTest(BadBytecodeTest):
class SourcelessLoaderBadBytecodeTest(BadBytecodeTest):
- loader = _bootstrap._SourcelessFileLoader
+ loader = _bootstrap.SourcelessFileLoader
def test_empty_file(self):
def test(name, mapping, bytecode_path):
diff --git a/Lib/importlib/test/source/test_finder.py b/Lib/importlib/test/source/test_finder.py
index f5de58a..32ebd73 100644
--- a/Lib/importlib/test/source/test_finder.py
+++ b/Lib/importlib/test/source/test_finder.py
@@ -38,7 +38,7 @@ class FinderTests(abc.FinderTests):
def import_(self, root, module):
loader_details = [(_bootstrap.SourceFileLoader,
_bootstrap._suffix_list(imp.PY_SOURCE), True),
- (_bootstrap._SourcelessFileLoader,
+ (_bootstrap.SourcelessFileLoader,
_bootstrap._suffix_list(imp.PY_COMPILED), True)]
finder = _bootstrap.FileFinder(root, *loader_details)
return finder.find_module(module)
diff --git a/Lib/importlib/test/test_abc.py b/Lib/importlib/test/test_abc.py
index e9eec60..008bd21 100644
--- a/Lib/importlib/test/test_abc.py
+++ b/Lib/importlib/test/test_abc.py
@@ -62,7 +62,7 @@ class ExecutionLoader(InheritanceTests, unittest.TestCase):
class FileLoader(InheritanceTests, unittest.TestCase):
superclasses = [abc.ResourceLoader, abc.ExecutionLoader]
- subclasses = [machinery.SourceFileLoader, machinery._SourcelessFileLoader]
+ subclasses = [machinery.SourceFileLoader, machinery.SourcelessFileLoader]
class SourceLoader(InheritanceTests, unittest.TestCase):