summaryrefslogtreecommitdiff
path: root/Lib/importlib/_bootstrap_external.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2021-03-26 11:55:07 -0700
committerGitHub <noreply@github.com>2021-03-26 11:55:07 -0700
commit1899087b21119c5c64cd41619b542c0bf0ab5751 (patch)
tree400c834041ef28eacaac8fa0169e2482dea8a775 /Lib/importlib/_bootstrap_external.py
parent21a2cabb3795f5170c746ab8f29e9d25c7442550 (diff)
downloadcpython-git-1899087b21119c5c64cd41619b542c0bf0ab5751.tar.gz
bpo-42136: Deprecate module_repr() as found in importlib (GH-25022)
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):