File tree Expand file tree Collapse file tree
Open diff view settings
Expand file tree Collapse file tree
Open diff view settings
Original file line number Diff line number Diff line change 11"""Abstract base classes related to import."""
22from . import _bootstrap_external
33from . import machinery
4+
45try :
56 import _frozen_importlib
67except ImportError as exc :
1112 import _frozen_importlib_external
1213except ImportError :
1314 _frozen_importlib_external = _bootstrap_external
14- from ._abc import Loader
1515import abc
1616
1717
18+ # Public API
19+ from ._abc import Loader
20+
1821__all__ = [
1922 'Loader' , 'MetaPathFinder' , 'PathEntryFinder' ,
2023 'ResourceLoader' , 'InspectLoader' , 'ExecutionLoader' ,
Original file line number Diff line number Diff line change 11"""The machinery of importlib: finders, loaders, hooks, etc."""
22
3+ lazy import warnings
4+
5+
6+ # Public API
37from ._bootstrap import ModuleSpec
48from ._bootstrap import BuiltinImporter
59from ._bootstrap import FrozenImporter
@@ -33,8 +37,6 @@ def all_suffixes():
3337
3438
3539def __getattr__ (name ):
36- import warnings
37-
3840 if name == 'DEBUG_BYTECODE_SUFFIXES' :
3941 warnings .warn ('importlib.machinery.DEBUG_BYTECODE_SUFFIXES is '
4042 'deprecated; use importlib.machinery.BYTECODE_SUFFIXES '
Original file line number Diff line number Diff line change 11"""Utility code for constructing importers, etc."""
2+
3+ from ._bootstrap import _resolve_name
4+ from ._bootstrap import _find_spec
5+
6+ import _imp
7+ import sys
8+ import types
9+
10+
11+ # Public API
212from ._abc import Loader
313from ._bootstrap import module_from_spec
4- from ._bootstrap import _resolve_name
514from ._bootstrap import spec_from_loader
6- from ._bootstrap import _find_spec
715from ._bootstrap_external import MAGIC_NUMBER
816from ._bootstrap_external import cache_from_source
917from ._bootstrap_external import decode_source
1018from ._bootstrap_external import source_from_cache
1119from ._bootstrap_external import spec_from_file_location
1220
13- import _imp
14- import sys
15- import types
16-
1721
1822def source_hash (source_bytes ):
1923 "Return the hash of *source_bytes* as used in hash-based pyc files."
You can’t perform that action at this time.
0 commit comments