Issue #14605: Insert to the front of sys.path_hooks instead of appending.
diff --git a/Python/import.c b/Python/import.c
index ab320e5..8cf10e6 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -268,8 +268,8 @@
"# can't import zipimport.zipimporter\n");
}
else {
- /* sys.path_hooks.append(zipimporter) */
- err = PyList_Append(path_hooks, zipimporter);
+ /* sys.path_hooks.insert(0, zipimporter) */
+ err = PyList_Insert(path_hooks, 0, zipimporter);
Py_DECREF(zipimporter);
if (err < 0) {
goto error;