From 3390347aa036404453213d589fe1e35902e55fd4 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 19 Nov 2020 13:43:43 +0100 Subject: bpo-42403: Simplify importlib external bootstrap (GH-23397) Simplify the importlib external bootstrap code: importlib._bootstrap_external now uses regular imports to import builtin modules. When it is imported, the builtin __import__() function is already fully working and so can be used to import builtin modules like sys. --- Lib/importlib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/importlib/__init__.py') diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py index bea37d7662..03ff71489a 100644 --- a/Lib/importlib/__init__.py +++ b/Lib/importlib/__init__.py @@ -34,7 +34,7 @@ try: import _frozen_importlib_external as _bootstrap_external except ImportError: from . import _bootstrap_external - _bootstrap_external._setup(_bootstrap) + _bootstrap_external._set_bootstrap_module(_bootstrap) _bootstrap._bootstrap_external = _bootstrap_external else: _bootstrap_external.__name__ = 'importlib._bootstrap_external' -- cgit v1.2.1