diff options
author | Brett Cannon <brett@python.org> | 2020-12-04 23:39:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 23:39:21 (GMT) |
commit | 2de5097ba4c50eba90df55696a7b2e74c93834d4 (patch) | |
tree | 7a3d54477997114ef27136e9c9da0e380f835a34 /Lib/importlib/_abc.py | |
parent | 79c1849b9e5b635bd36b13e1be9dc7cbc2bd6312 (diff) | |
download | cpython-2de5097ba4c50eba90df55696a7b2e74c93834d4.zip cpython-2de5097ba4c50eba90df55696a7b2e74c93834d4.tar.gz cpython-2de5097ba4c50eba90df55696a7b2e74c93834d4.tar.bz2 |
bpo-26131: Deprecate usage of load_module() (GH-23469)
Raise an ImportWarning when the import system falls back on load_module(). As for implementations of load_module(), raise a DeprecationWarning.
Diffstat (limited to 'Lib/importlib/_abc.py')
-rw-r--r-- | Lib/importlib/_abc.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/importlib/_abc.py b/Lib/importlib/_abc.py index fb5ec72..7591946 100644 --- a/Lib/importlib/_abc.py +++ b/Lib/importlib/_abc.py @@ -35,6 +35,7 @@ class Loader(metaclass=abc.ABCMeta): """ if not hasattr(self, 'exec_module'): raise ImportError + # Warning implemented in _load_module_shim(). return _bootstrap._load_module_shim(self, fullname) def module_repr(self, module): |