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.
MinRK 14 years ago committed by Fernando Perez
parent 2a9ae4ee37
commit 70de13a394

@ -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.
""")

@ -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."
)

Loading…
Cancel
Save