diff options
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 6c3e031..358c650 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -1323,10 +1323,13 @@ class PathFinder: # This would be a good place for a DeprecationWarning if # we ended up going that route. if hasattr(finder, 'find_loader'): + msg = (f"{_bootstrap._object_name(finder)}.find_spec() not found; " + "falling back to find_loader()") + _warnings.warn(msg, ImportWarning) loader, portions = finder.find_loader(fullname) else: msg = (f"{_bootstrap._object_name(finder)}.find_spec() not found; " - "falling back to find_module()") + "falling back to find_module()") _warnings.warn(msg, ImportWarning) loader = finder.find_module(fullname) portions = [] |