[Python-checkins] gh-99582: freeze `zipimport` into `_bootstrap_python` (#99583)

kumaraditya303 webhook-mailer at python.org
Sat Dec 10 04:36:01 EST 2022


https://github.com/python/cpython/commit/228c92eb5c126130316a32b44a0ce8f28cc5d544
commit: 228c92eb5c126130316a32b44a0ce8f28cc5d544
branch: main
author: Kai Zhang <kylerzhang11 at gmail.com>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2022-12-10T15:05:56+05:30
summary:

gh-99582: freeze `zipimport` into `_bootstrap_python` (#99583)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>

files:
A Misc/NEWS.d/next/Core and Builtins/2022-11-19-01-11-06.gh-issue-99582.wvOBVy.rst
M Makefile.pre.in
M Programs/_bootstrap_python.c

diff --git a/Makefile.pre.in b/Makefile.pre.in
index de42d684f166..815df69ad48c 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -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
index 000000000000..320d47cb9cf6
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2022-11-19-01-11-06.gh-issue-99582.wvOBVy.rst	
@@ -0,0 +1 @@
+Freeze :mod:`zipimport` module into ``_bootstrap_python``.
diff --git a/Programs/_bootstrap_python.c b/Programs/_bootstrap_python.c
index 6e1593a0b599..6c388fc7033d 100644
--- a/Programs/_bootstrap_python.c
+++ b/Programs/_bootstrap_python.c
@@ -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[] = {



More information about the Python-checkins mailing list