diff options
author | Brett Cannon <brett@python.org> | 2012-04-22 23:58:33 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-22 23:58:33 (GMT) |
commit | 938d44d59c9cc142d35f51a908cabf781b482f26 (patch) | |
tree | 93d2bd601f966f742ef2f6caca7b374e84f6a0b2 /Lib/imp.py | |
parent | 8c5e920ae3e98ebc5b37a105cf86e4c1e9649f57 (diff) | |
download | cpython-938d44d59c9cc142d35f51a908cabf781b482f26.zip cpython-938d44d59c9cc142d35f51a908cabf781b482f26.tar.gz cpython-938d44d59c9cc142d35f51a908cabf781b482f26.tar.bz2 |
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.
Diffstat (limited to 'Lib/imp.py')
-rw-r--r-- | Lib/imp.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -71,7 +71,7 @@ class _HackedGetData: def get_data(self, path): """Gross hack to contort loader to deal w/ load_*()'s bad API.""" - if self.file and path == self._path: + if self.file and path == self.path: with self.file: # Technically should be returning bytes, but # SourceLoader.get_code() just passed what is returned to @@ -83,7 +83,7 @@ class _HackedGetData: return super().get_data(path) -class _LoadSourceCompatibility(_HackedGetData, _bootstrap._SourceFileLoader): +class _LoadSourceCompatibility(_HackedGetData, _bootstrap.SourceFileLoader): """Compatibility support for implementing load_source().""" @@ -115,7 +115,7 @@ def load_package(name, path): break else: raise ValueError('{!r} is not a package'.format(path)) - return _bootstrap._SourceFileLoader(name, path).load_module(name) + return _bootstrap.SourceFileLoader(name, path).load_module(name) # XXX deprecate |