mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-29576: add explicit deprecation for importlib.abc.find_loader() and find_module() (GH-32)
This commit is contained in:
parent
72dccde884
commit
1d4601c2c6
5 changed files with 41 additions and 7 deletions
|
|
@ -79,7 +79,8 @@ def find_loader(name, path=None):
|
|||
This function is deprecated in favor of importlib.util.find_spec().
|
||||
|
||||
"""
|
||||
warnings.warn('Use importlib.util.find_spec() instead.',
|
||||
warnings.warn('Deprecated since Python 3.4. '
|
||||
'Use importlib.util.find_spec() instead.',
|
||||
DeprecationWarning, stacklevel=2)
|
||||
try:
|
||||
loader = sys.modules[name].__loader__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue