From 70de13a394f09c77ea41394690c0798e1884a4da Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 1 Nov 2011 15:15:33 -0700 Subject: [PATCH] add Integer traitlet Most int traits are now Integers Integer differs from Long only in that small `long`s are cast to `int`, rather than all `int`s being cast to `long`: Integer(4L) => 4 Long(4) => 4L closes gh-942, closes gh-996. Rebased to avoid recursive merge for just one commit. --- IPython/frontend/html/notebook/kernelmanager.py | 4 ++-- IPython/frontend/html/notebook/notebookapp.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IPython/frontend/html/notebook/kernelmanager.py b/IPython/frontend/html/notebook/kernelmanager.py index f3fe6a661..c81664811 100644 --- a/IPython/frontend/html/notebook/kernelmanager.py +++ b/IPython/frontend/html/notebook/kernelmanager.py @@ -29,7 +29,7 @@ from tornado import web from IPython.config.configurable import LoggingConfigurable from IPython.zmq.ipkernel import launch_kernel from IPython.zmq.kernelmanager import KernelManager -from IPython.utils.traitlets import Instance, Dict, List, Unicode, Float, Int +from IPython.utils.traitlets import Instance, Dict, List, Unicode, Float, Integer #----------------------------------------------------------------------------- # Classes @@ -196,7 +196,7 @@ class MappingKernelManager(MultiKernelManager): kernel_argv = List(Unicode) kernel_manager = Instance(KernelManager) time_to_dead = Float(3.0, config=True, help="""Kernel heartbeat interval in seconds.""") - max_msg_size = Int(65536, config=True, help=""" + max_msg_size = Integer(65536, config=True, help=""" The max raw message size accepted from the browser over a WebSocket connection. """) diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index f6191f1d2..e507607d8 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -57,7 +57,7 @@ from IPython.zmq.ipkernel import ( aliases as ipkernel_aliases, IPKernelApp ) -from IPython.utils.traitlets import Dict, Unicode, Int, List, Enum, Bool +from IPython.utils.traitlets import Dict, Unicode, Integer, List, Enum, Bool #----------------------------------------------------------------------------- # Module globals @@ -195,7 +195,7 @@ class NotebookApp(BaseIPythonApplication): def _ip_changed(self, name, old, new): if new == u'*': self.ip = u'' - port = Int(8888, config=True, + port = Integer(8888, config=True, help="The port the notebook server will listen on." )