diff --git a/IPython/core/shellapp.py b/IPython/core/shellapp.py index c89fa46..18b1491 100644 --- a/IPython/core/shellapp.py +++ b/IPython/core/shellapp.py @@ -184,15 +184,15 @@ class InteractiveShellApp(Configurable): module_to_run = Unicode('', config=True, help="Run the module as a script." ) - gui = CaselessStrEnum(gui_keys, config=True, + gui = CaselessStrEnum(gui_keys, config=True, allow_none=True, help="Enable GUI event loop integration with any of {0}.".format(gui_keys) ) - matplotlib = CaselessStrEnum(backend_keys, + matplotlib = CaselessStrEnum(backend_keys, allow_none=True, config=True, help="""Configure matplotlib for interactive use with the default matplotlib backend.""" ) - pylab = CaselessStrEnum(backend_keys, + pylab = CaselessStrEnum(backend_keys, allow_none=True, config=True, help="""Pre-load matplotlib and numpy for interactive use, selecting a particular matplotlib backend and loop integration. diff --git a/IPython/kernel/tests/test_message_spec.py b/IPython/kernel/tests/test_message_spec.py index 996ea7c..2ca59c7 100644 --- a/IPython/kernel/tests/test_message_spec.py +++ b/IPython/kernel/tests/test_message_spec.py @@ -106,7 +106,7 @@ class MimeBundle(Reference): class ExecuteReply(Reference): execution_count = Integer() - status = Enum((u'ok', u'error')) + status = Enum((u'ok', u'error'), allow_none=True) def check(self, d): Reference.check(self, d) @@ -139,7 +139,7 @@ class ArgSpec(Reference): class Status(Reference): - execution_state = Enum((u'busy', u'idle', u'starting')) + execution_state = Enum((u'busy', u'idle', u'starting'), allow_none=True) class CompleteReply(Reference): @@ -165,7 +165,7 @@ class KernelInfoReply(Reference): class IsCompleteReply(Reference): - status = Enum((u'complete', u'incomplete', u'invalid', u'unknown')) + status = Enum((u'complete', u'incomplete', u'invalid', u'unknown'), allow_none=True) def check(self, d): Reference.check(self, d) @@ -187,7 +187,7 @@ Error = ExecuteReplyError class Stream(Reference): - name = Enum((u'stdout', u'stderr')) + name = Enum((u'stdout', u'stderr'), allow_none=True) text = Unicode() diff --git a/IPython/terminal/console/interactiveshell.py b/IPython/terminal/console/interactiveshell.py index ef97c87..a859729 100644 --- a/IPython/terminal/console/interactiveshell.py +++ b/IPython/terminal/console/interactiveshell.py @@ -50,7 +50,7 @@ class ZMQTerminalInteractiveShell(TerminalInteractiveShell): ) image_handler = Enum(('PIL', 'stream', 'tempfile', 'callable'), - config=True, help= + config=True, allow_none=True, help= """ Handler for image type output. This is useful, for example, when connecting to the kernel in which pylab inline backend is