You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zipimport: Remove deprecated find_loader() and find_module() methods, use find_spec() instead #94379
Thanks @vstinner. When @brettcannon and I talked about it, we noticed that load_module() only raised ImportWarning in 3.10, so in 3.12 it will raise DeprecationWarning and will be removed in 3.14.
# Load and return the module named by 'fullname'.defload_module(self, fullname):
"""load_module(fullname) -> module. Load the module specified by 'fullname'. 'fullname' must be the fully qualified (dotted) module name. It returns the imported module, or raises ZipImportError if it could not be imported. Deprecated since Python 3.10. Use exec_module() instead. """msg= ("zipimport.zipimporter.load_module() is deprecated and slated for ""removal in Python 3.12; use exec_module() instead")
_warnings.warn(msg, DeprecationWarning)
(...)
Activity
gh-94379: Remove zipimport find_loader() and find_module() methods (#…
warsaw commentedon Oct 7, 2022
I'm looking at removing
find_loader()everywhere. @brettcannon @ericsnowcurrentlywarsaw commentedon Oct 7, 2022
@vstinner Shouldn't this ticket be closed given that the PR you referenced was merged?
vstinner commentedon Oct 10, 2022
First my PR #94380 also tried to remove load_module() but I got issues, so 92bcb26 only removes find_loader() and find_module() methods.
This issue title is only "zipimport: Remove deprecated find_loader() and find_module() methods", so yep, I'm fine with closing it.
warsaw commentedon Oct 10, 2022
Thanks @vstinner. When @brettcannon and I talked about it, we noticed that
load_module()only raisedImportWarningin 3.10, so in 3.12 it will raiseDeprecationWarningand will be removed in 3.14.vstinner commentedon Oct 10, 2022
Ah? I only looked at zipimport.py code: