summaryrefslogtreecommitdiff
path: root/Lib/importlib/_bootstrap_external.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
-rw-r--r--Lib/importlib/_bootstrap_external.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 2dab45d480..dac881fa42 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -1230,6 +1230,8 @@ class _NamespaceLoader:
The method is deprecated. The import machinery does the job itself.
"""
+ _warnings.warn("_NamespaceLoader.module_repr() is deprecated and "
+ "slated for removal in Python 3.12", DeprecationWarning)
return '<module {!r} (namespace)>'.format(module.__name__)
def is_package(self, fullname):