diff options
author | Brett Cannon <brett@python.org> | 2021-04-06 15:56:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 15:56:57 (GMT) |
commit | 57c6cb5100d19a0e0218c77d887c3c239c9ce435 (patch) | |
tree | 8e193c0bc12f476821639c8363d280ef9d604271 /Lib/zipimport.py | |
parent | efccff9ac84009ef48e8cb22548ce80940f76533 (diff) | |
download | cpython-57c6cb5100d19a0e0218c77d887c3c239c9ce435.zip cpython-57c6cb5100d19a0e0218c77d887c3c239c9ce435.tar.gz cpython-57c6cb5100d19a0e0218c77d887c3c239c9ce435.tar.bz2 |
bpo-42135: Deprecate implementations of find_module() and find_loader() (GH-25169)
Diffstat (limited to 'Lib/zipimport.py')
-rw-r--r-- | Lib/zipimport.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/zipimport.py b/Lib/zipimport.py index e88d7a2..c55fec6 100644 --- a/Lib/zipimport.py +++ b/Lib/zipimport.py @@ -119,6 +119,9 @@ class zipimporter(_bootstrap_external._LoaderBasics): Deprecated since Python 3.10. Use find_spec() instead. """ + _warnings.warn("zipimporter.find_loader() is deprecated and slated for " + "removal in Python 3.12; use find_spec() instead", + DeprecationWarning) mi = _get_module_info(self, fullname) if mi is not None: # This is a module or package. @@ -152,6 +155,9 @@ class zipimporter(_bootstrap_external._LoaderBasics): Deprecated since Python 3.10. Use find_spec() instead. """ + _warnings.warn("zipimporter.find_module() is deprecated and slated for " + "removal in Python 3.12; use find_spec() instead", + DeprecationWarning) return self.find_loader(fullname, path)[0] def find_spec(self, fullname, target=None): |