From f242ef4a0913b63e32ae3e33045a3efd02202d29 Mon Sep 17 00:00:00 2001 From: ahgamut <41098605+ahgamut@users.noreply.github.com> Date: Tue, 21 Jun 2022 08:26:19 +0530 Subject: [PATCH] revert file loader order back to source-first In #248 we changed _bootstrap_external to check for bytecode first, and then check for source files when loading in the import process. Now that we have our own meta_path entry, this change can be undone. --- third_party/python/Lib/importlib/_bootstrap_external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/python/Lib/importlib/_bootstrap_external.py b/third_party/python/Lib/importlib/_bootstrap_external.py index 54713dd82..f8ab20b54 100644 --- a/third_party/python/Lib/importlib/_bootstrap_external.py +++ b/third_party/python/Lib/importlib/_bootstrap_external.py @@ -1349,7 +1349,7 @@ def _get_supported_file_loaders(): # extensions = ExtensionFileLoader, _imp.extension_suffixes() source = SourceFileLoader, SOURCE_SUFFIXES bytecode = SourcelessFileLoader, BYTECODE_SUFFIXES - return [bytecode, source] #, extensions] + return [source, bytecode] #, extensions] def _setup(_bootstrap_module): """Setup the path-based importers for importlib by importing needed