]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-99582: freeze `zipimport` into `_bootstrap_python` (#99583)
authorKai Zhang <kylerzhang11@gmail.com>
Sat, 10 Dec 2022 09:35:56 +0000 (17:35 +0800)
committerGitHub <noreply@github.com>
Sat, 10 Dec 2022 09:35:56 +0000 (15:05 +0530)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Makefile.pre.in
Misc/NEWS.d/next/Core and Builtins/2022-11-19-01-11-06.gh-issue-99582.wvOBVy.rst [new file with mode: 0644]
Programs/_bootstrap_python.c

index de42d684f16602820a201007332030a712edfa68..815df69ad48c67864fccc0fc138425554ce7e4c2 100644 (file)
@@ -976,7 +976,8 @@ Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS)
 
 BOOTSTRAP_HEADERS = \
        Python/frozen_modules/importlib._bootstrap.h \
-       Python/frozen_modules/importlib._bootstrap_external.h
+       Python/frozen_modules/importlib._bootstrap_external.h \
+       Python/frozen_modules/zipimport.h
 
 Programs/_bootstrap_python.o: Programs/_bootstrap_python.c $(BOOTSTRAP_HEADERS) $(PYTHON_HEADERS)
 
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-11-19-01-11-06.gh-issue-99582.wvOBVy.rst b/Misc/NEWS.d/next/Core and Builtins/2022-11-19-01-11-06.gh-issue-99582.wvOBVy.rst
new file mode 100644 (file)
index 0000000..320d47c
--- /dev/null
@@ -0,0 +1 @@
+Freeze :mod:`zipimport` module into ``_bootstrap_python``.
index 6e1593a0b5996a71aed2d97e2c83aaf3a9baa9ea..6c388fc7033dd06bff68c86d3891a6e38fae4beb 100644 (file)
@@ -12,6 +12,7 @@
 /* Includes for frozen modules: */
 #include "Python/frozen_modules/importlib._bootstrap.h"
 #include "Python/frozen_modules/importlib._bootstrap_external.h"
+#include "Python/frozen_modules/zipimport.h"
 /* End includes */
 
 uint32_t _Py_next_func_version = 1;
@@ -32,6 +33,7 @@ _Py_Deepfreeze_Fini(void)
 static const struct _frozen bootstrap_modules[] = {
     {"_frozen_importlib", _Py_M__importlib__bootstrap, (int)sizeof(_Py_M__importlib__bootstrap)},
     {"_frozen_importlib_external", _Py_M__importlib__bootstrap_external, (int)sizeof(_Py_M__importlib__bootstrap_external)},
+    {"zipimport", _Py_M__zipimport, (int)sizeof(_Py_M__zipimport)},
     {0, 0, 0} /* bootstrap sentinel */
 };
 static const struct _frozen stdlib_modules[] = {