From 25e7db545affc0152eb81fbee8156e193a0d5079 Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Sat, 11 Dec 2021 17:40:49 +0000 Subject: [PATCH] bpo-28816: [doc] clarify that zipimport invokes importers only for python files --- Doc/library/zipimport.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst index cd7030fed017327..fe1adcae163c23f 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