##// END OF EJS Templates
Rename version_rep/req to kernel_info_rep/req
Takafumi Arakaki -
Show More
@@ -161,7 +161,7 b' class Kernel(Configurable):'
161 # Build dict of handlers for message types
161 # Build dict of handlers for message types
162 msg_types = [ 'execute_request', 'complete_request',
162 msg_types = [ 'execute_request', 'complete_request',
163 'object_info_request', 'history_request',
163 'object_info_request', 'history_request',
164 'version_request',
164 'kernel_info_request',
165 'connect_request', 'shutdown_request',
165 'connect_request', 'shutdown_request',
166 'apply_request',
166 'apply_request',
167 ]
167 ]
@@ -515,14 +515,14 b' class Kernel(Configurable):'
515 content, parent, ident)
515 content, parent, ident)
516 self.log.debug("%s", msg)
516 self.log.debug("%s", msg)
517
517
518 def version_request(self, stream, ident, parent):
518 def kernel_info_request(self, stream, ident, parent):
519 vinfo = {
519 vinfo = {
520 'protocol_version': protocol_version,
520 'protocol_version': protocol_version,
521 'ipython_version': ipython_version,
521 'ipython_version': ipython_version,
522 'language_version': language_version,
522 'language_version': language_version,
523 'language': 'python',
523 'language': 'python',
524 }
524 }
525 msg = self.session.send(stream, 'version_reply',
525 msg = self.session.send(stream, 'kernel_info_reply',
526 vinfo, parent, ident)
526 vinfo, parent, ident)
527 self.log.debug("%s", msg)
527 self.log.debug("%s", msg)
528
528
@@ -365,7 +365,7 b' class ShellSocketChannel(ZMQSocketChannel):'
365
365
366 def version(self):
366 def version(self):
367 """Request kernel version info."""
367 """Request kernel version info."""
368 msg = self.session.msg('version_request')
368 msg = self.session.msg('kernel_info_request')
369 self._queue_send(msg)
369 self._queue_send(msg)
370 return msg['header']['msg_id']
370 return msg['header']['msg_id']
371
371
@@ -199,7 +199,7 b' def Version(num, trait=Integer):'
199 return List(trait, default_value=[0] * num, minlen=num, maxlen=num)
199 return List(trait, default_value=[0] * num, minlen=num, maxlen=num)
200
200
201
201
202 class VersionReply(Reference):
202 class KernelInfoReply(Reference):
203
203
204 protocol_version = Version(2)
204 protocol_version = Version(2)
205 ipython_version = Version(4, Any)
205 ipython_version = Version(4, Any)
@@ -255,7 +255,7 b' references = {'
255 'object_info_reply' : OInfoReply(),
255 'object_info_reply' : OInfoReply(),
256 'status' : Status(),
256 'status' : Status(),
257 'complete_reply' : CompleteReply(),
257 'complete_reply' : CompleteReply(),
258 'version_reply': VersionReply(),
258 'kernel_info_reply': KernelInfoReply(),
259 'pyin' : PyIn(),
259 'pyin' : PyIn(),
260 'pyout' : PyOut(),
260 'pyout' : PyOut(),
261 'pyerr' : PyErr(),
261 'pyerr' : PyErr(),
@@ -455,14 +455,14 b' def test_complete():'
455
455
456
456
457 @dec.parametric
457 @dec.parametric
458 def test_version_request():
458 def test_kernel_info_request():
459 flush_channels()
459 flush_channels()
460
460
461 shell = KM.shell_channel
461 shell = KM.shell_channel
462
462
463 msg_id = shell.version()
463 msg_id = shell.version()
464 reply = shell.get_msg(timeout=2)
464 reply = shell.get_msg(timeout=2)
465 for tst in validate_message(reply, 'version_reply', msg_id):
465 for tst in validate_message(reply, 'kernel_info_reply', msg_id):
466 yield tst
466 yield tst
467
467
468
468
@@ -670,8 +670,8 b' Message type: ``connect_reply``::'
670 }
670 }
671
671
672
672
673 Version
673 Kernel info
674 -------
674 -----------
675
675
676 If a client needs to know what protocol the kernel supports, it can
676 If a client needs to know what protocol the kernel supports, it can
677 ask version number of the messaging protocol supported by the kernel.
677 ask version number of the messaging protocol supported by the kernel.
@@ -679,12 +679,12 b' This message can be used to fetch other core information of the'
679 kernel, including language (e.g., Python), language version number and
679 kernel, including language (e.g., Python), language version number and
680 IPython version number.
680 IPython version number.
681
681
682 Message type: ``version_request``::
682 Message type: ``kernel_info_request``::
683
683
684 content = {
684 content = {
685 }
685 }
686
686
687 Message type: ``version_reply``::
687 Message type: ``kernel_info_reply``::
688
688
689 content = {
689 content = {
690 # Version of messaging protocol (mandatory).
690 # Version of messaging protocol (mandatory).
General Comments 0
You need to be logged in to leave comments. Login now