diff options
author | Brett Cannon <brett@python.org> | 2016-09-06 23:20:46 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-09-06 23:20:46 (GMT) |
commit | eaecc692df78e34f93802752aa9110d06814ea53 (patch) | |
tree | 296252d3343061aac0b350e3dea3a4bfb90d4f14 /Lib/importlib/_bootstrap.py | |
parent | 9b1f474df6f284de982c422c9a490971ccc1b296 (diff) | |
download | cpython-eaecc692df78e34f93802752aa9110d06814ea53.zip cpython-eaecc692df78e34f93802752aa9110d06814ea53.tar.gz cpython-eaecc692df78e34f93802752aa9110d06814ea53.tar.bz2 |
Issue #27974: Remove importlib._bootstrap._ManageReload.
Class was dead code. Thanks to Xiang Zhang for the patch.
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 11df706..2eeafe1 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -36,23 +36,6 @@ def _new_module(name): return type(sys)(name) -class _ManageReload: - - """Manages the possible clean-up of sys.modules for load_module().""" - - def __init__(self, name): - self._name = name - - def __enter__(self): - self._is_reload = self._name in sys.modules - - def __exit__(self, *args): - if any(arg is not None for arg in args) and not self._is_reload: - try: - del sys.modules[self._name] - except KeyError: - pass - # Module-level locking ######################################################## # A dict mapping module names to weakrefs of _ModuleLock instances |