aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/importlib/_bootstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r--Lib/importlib/_bootstrap.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index d5acb6545f8..ab52e778fda 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -903,8 +903,9 @@ def _resolve_name(name, package, level):
def _find_spec_legacy(finder, name, path):
- # This would be a good place for a DeprecationWarning if
- # we ended up going that route.
+ msg = (f"{_object_name(finder)}.find_spec() not found; "
+ "falling back to find_module()")
+ _warnings.warn(msg, ImportWarning)
loader = finder.find_module(name, path)
if loader is None:
return None