[Python-checkins] bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) (GH-30134)

iritkatriel webhook-mailer at python.org
Thu Dec 16 07:23:30 EST 2021


https://github.com/python/cpython/commit/4c1effaaee472cc67f3186411a3df4f39af3d71a
commit: 4c1effaaee472cc67f3186411a3df4f39af3d71a
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2021-12-16T12:23:17Z
summary:

bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) (GH-30134)

(cherry picked from commit a951c95a13c3555ac8fb1c8ee615ba3930ccc6f7)

Co-authored-by: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>

files:
M Doc/library/zipimport.rst

diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst
index 8ac3fb16bdb90d..a3a24ec3c84ac6 100644
--- a/Doc/library/zipimport.rst
+++ b/Doc/library/zipimport.rst
@@ -23,8 +23,8 @@ and a path within the archive can be specified to only import from a
 subdirectory.  For example, the path :file:`example.zip/lib/` would only
 import from the :file:`lib/` subdirectory within the archive.
 
-Any files may be present in the ZIP archive, but only files :file:`.py` and
-:file:`.pyc` are available for import.  ZIP import of dynamic modules
+Any files may be present in the ZIP archive, but importers are only invoked for
+:file:`.py` and :file:`.pyc` files.  ZIP import of dynamic modules
 (:file:`.pyd`, :file:`.so`) is disallowed. Note that if an archive only contains
 :file:`.py` files, Python will not attempt to modify the archive by adding the
 corresponding :file:`.pyc` file, meaning that if a ZIP archive



More information about the Python-checkins mailing list