FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue #27974: Remove importlib._bootstrap._ManageReload. · python-emscripten/cpython@eaecc69 · GitHub

Repository navigation

Commit eaecc69

Browse files
committed
Issue python#27974: Remove importlib._bootstrap._ManageReload.
Class was dead code. Thanks to Xiang Zhang for the patch.
1 parent 9b1f474 commit eaecc69

2 files changed

Lines changed: 1746 additions & 1816 deletions

File tree

‎Lib/importlib/_bootstrap.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,6 @@ def _new_module(name):
3636
return type(sys)(name)
3737

3838

39-
class _ManageReload:
40-
41-
"""Manages the possible clean-up of sys.modules for load_module()."""
42-
43-
def __init__(self, name):
44-
self._name = name
45-
46-
def __enter__(self):
47-
self._is_reload = self._name in sys.modules
48-
49-
def __exit__(self, *args):
50-
if any(arg is not None for arg in args) and not self._is_reload:
51-
try:
52-
del sys.modules[self._name]
53-
except KeyError:
54-
pass
55-
5639
# Module-level locking ########################################################
5740

5841
# A dict mapping module names to weakrefs of _ModuleLock instances

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL