Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc1d1d4

Browse files
committed
remove unregister trait-change callback in ExtensionManager.__del__
Due to reference cycles, this can never be called at a time when it would matter, but seems to cause weird crashes sometimes during interpreter teardown on Python 3.5 with traitlets 4.1.
1 parent 3e9017c commit dc1d1d4

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

IPython/core/extensions.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ def __init__(self, shell=None, **kwargs):
5959
)
6060
self.loaded = set()
6161

62-
def __del__(self):
63-
self.shell.on_trait_change(
64-
self._on_ipython_dir_changed, 'ipython_dir', remove=True
65-
)
66-
6762
@property
6863
def ipython_extension_dir(self):
6964
return os.path.join(self.shell.ipython_dir, u'extensions')

0 commit comments

Comments
 (0)