From a59c508996e3fce1caf8b20002c22dd3c4396dbe Mon Sep 17 00:00:00 2001 From: gpotter2 Date: Tue, 12 Jun 2018 03:37:21 +0200 Subject: [PATCH] Add __spec__ to DummyMod --- IPython/core/interactiveshell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 4593c6b99c4..69bf523e805 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -170,7 +170,7 @@ def validate(self, obj, value): class DummyMod(object): """A dummy module used for IPython's interactive module when a namespace must be assigned to the module's __dict__.""" - pass + __spec__ = None class ExecutionInfo(object):