bpo-22257: Small changes for PEP 432. (#1728)

PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
This commit is contained in:
Eric Snow 2017-05-22 21:36:03 -07:00 committed by GitHub
parent f9169ce6b4
commit 6b4be195cd
19 changed files with 2221 additions and 2006 deletions

View file

@ -1134,12 +1134,15 @@ def _setup(sys_module, _imp_module):
def _install(sys_module, _imp_module):
"""Install importlib as the implementation of import."""
"""Install importers for builtin and frozen modules"""
_setup(sys_module, _imp_module)
sys.meta_path.append(BuiltinImporter)
sys.meta_path.append(FrozenImporter)
def _install_external_importers():
"""Install importers that require external filesystem access"""
global _bootstrap_external
import _frozen_importlib_external
_bootstrap_external = _frozen_importlib_external