From 1899087b21119c5c64cd41619b542c0bf0ab5751 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 26 Mar 2021 11:55:07 -0700 Subject: bpo-42136: Deprecate module_repr() as found in importlib (GH-25022) --- Lib/importlib/_bootstrap_external.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/importlib/_bootstrap_external.py') 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 ''.format(module.__name__) def is_package(self, fullname): -- cgit v1.2.1