diff --git a/IPython/zmq/ipkernel.py b/IPython/zmq/ipkernel.py index a410a1b..fa43e13 100755 --- a/IPython/zmq/ipkernel.py +++ b/IPython/zmq/ipkernel.py @@ -161,7 +161,7 @@ class Kernel(Configurable): # Build dict of handlers for message types msg_types = [ 'execute_request', 'complete_request', 'object_info_request', 'history_request', - 'version_request', + 'kernel_info_request', 'connect_request', 'shutdown_request', 'apply_request', ] @@ -515,14 +515,14 @@ class Kernel(Configurable): content, parent, ident) self.log.debug("%s", msg) - def version_request(self, stream, ident, parent): + def kernel_info_request(self, stream, ident, parent): vinfo = { 'protocol_version': protocol_version, 'ipython_version': ipython_version, 'language_version': language_version, 'language': 'python', } - msg = self.session.send(stream, 'version_reply', + msg = self.session.send(stream, 'kernel_info_reply', vinfo, parent, ident) self.log.debug("%s", msg) diff --git a/IPython/zmq/kernelmanager.py b/IPython/zmq/kernelmanager.py index 27c24af..0378ccc 100644 --- a/IPython/zmq/kernelmanager.py +++ b/IPython/zmq/kernelmanager.py @@ -365,7 +365,7 @@ class ShellSocketChannel(ZMQSocketChannel): def version(self): """Request kernel version info.""" - msg = self.session.msg('version_request') + msg = self.session.msg('kernel_info_request') self._queue_send(msg) return msg['header']['msg_id'] diff --git a/IPython/zmq/tests/test_message_spec.py b/IPython/zmq/tests/test_message_spec.py index 51fb3a8..529c657 100644 --- a/IPython/zmq/tests/test_message_spec.py +++ b/IPython/zmq/tests/test_message_spec.py @@ -199,7 +199,7 @@ def Version(num, trait=Integer): return List(trait, default_value=[0] * num, minlen=num, maxlen=num) -class VersionReply(Reference): +class KernelInfoReply(Reference): protocol_version = Version(2) ipython_version = Version(4, Any) @@ -255,7 +255,7 @@ references = { 'object_info_reply' : OInfoReply(), 'status' : Status(), 'complete_reply' : CompleteReply(), - 'version_reply': VersionReply(), + 'kernel_info_reply': KernelInfoReply(), 'pyin' : PyIn(), 'pyout' : PyOut(), 'pyerr' : PyErr(), @@ -455,14 +455,14 @@ def test_complete(): @dec.parametric -def test_version_request(): +def test_kernel_info_request(): flush_channels() shell = KM.shell_channel msg_id = shell.version() reply = shell.get_msg(timeout=2) - for tst in validate_message(reply, 'version_reply', msg_id): + for tst in validate_message(reply, 'kernel_info_reply', msg_id): yield tst diff --git a/docs/source/development/messaging.txt b/docs/source/development/messaging.txt index b7fe2d3..7505acb 100644 --- a/docs/source/development/messaging.txt +++ b/docs/source/development/messaging.txt @@ -670,8 +670,8 @@ Message type: ``connect_reply``:: } -Version -------- +Kernel info +----------- If a client needs to know what protocol the kernel supports, it can ask version number of the messaging protocol supported by the kernel. @@ -679,12 +679,12 @@ This message can be used to fetch other core information of the kernel, including language (e.g., Python), language version number and IPython version number. -Message type: ``version_request``:: +Message type: ``kernel_info_request``:: content = { } -Message type: ``version_reply``:: +Message type: ``kernel_info_reply``:: content = { # Version of messaging protocol (mandatory).