Repository: bokeh/bokeh

Issue:
Head breaks apps that use widgets with type parameter
After the Typescript merge any application or bokeh code that uses a widget with the **type** parameter, such as a Button, will error with an AttributeError.

Recommend: Use a deprecation warning instead or "magically" convert it behind the scenes when running so it does not error.

To Recreate: Run any app or Bokeh code with a widget that contains the type parameter that run under 0.11.1. Alternatively, run the following Bokeh code (taken from Bokeh docs) against head:

```
from bokeh.models.widgets import Button
from bokeh.io import output_file, show, vform

output_file("button.html")

button = Button(label="Foo", type="success")

show(vform(button))
```



Discussion:
ping @mattpap need a deprecation here


Resolving patch:
diff --git a/bokeh/models/widgets/buttons.py b/bokeh/models/widgets/buttons.py
--- a/bokeh/models/widgets/buttons.py
+++ b/bokeh/models/widgets/buttons.py
@@ -3,7 +3,9 @@
 """
 from __future__ import absolute_import
 
-from ...core.properties import abstract
+import warnings
+
+from ...core.properties import abstract, HasProps
 from ...core.properties import Bool, Int, String, Enum, Instance, List, Tuple, Override
 from ...core.enums import ButtonType
 from ..callbacks import Callback
@@ -11,7 +13,35 @@
 from .icons import AbstractIcon
 
 @abstract
-class AbstractButton(Widget):
+class ButtonLike(HasProps):
+    """ Shared properties for button-like widgets. """
+
+    button_type = Enum(ButtonType, help="""
+    A style for the button, signifying it's role.
+    """)
+
+    @property
+    def type(self):
+        warnings.warn(
+            """
+            Property 'type' was deprecated in Bokeh 0.12.0
+            and will be removed. Use 'button_type' instead.
+            """)
+        return self.button_type
+
+    @type.setter
+    def type(self, type):
+        warnings.warn(
+            """
+            Property 'type' was deprecated in Bokeh 0.12.0
+            and will be removed. Use 'button_type' instead.
+            """)
+        self.button_type = type
+
+    __deprecated_attributes__ = ('type',)
+
+@abstract
+class AbstractButton(Widget, ButtonLike):
     """ A base class that defines common properties for all
     button types. ``AbstractButton`` is not generally useful to
     instantiate on its own.
@@ -26,10 +56,6 @@ class AbstractButton(Widget):
     An optional image appearing to the left of button's text.
     """)
 
-    button_type = Enum(ButtonType, help="""
-    A style for the button, signifying it's role.
-    """)
-
     callback = Instance(Callback, help="""
     A callback to run in the browser whenever the button is activated.
     """)
diff --git a/bokeh/models/widgets/groups.py b/bokeh/models/widgets/groups.py
--- a/bokeh/models/widgets/groups.py
+++ b/bokeh/models/widgets/groups.py
@@ -4,9 +4,9 @@
 from __future__ import absolute_import
 
 from ...core.properties import abstract
-from ...core.properties import Bool, Int, String, Enum, List
-from ...core.enums import ButtonType
+from ...core.properties import Bool, Int, String, List
 from .widget import Widget
+from .buttons import ButtonLike
 
 @abstract
 class AbstractGroup(Widget):
@@ -33,15 +33,11 @@ def on_click(self, handler):
         self.on_change('active', lambda attr, old, new: handler(new))
 
 @abstract
-class ButtonGroup(AbstractGroup):
+class ButtonGroup(AbstractGroup, ButtonLike):
     """ Abstract base class for groups with items rendered as buttons.
     ``ButtonGroup`` is not generally useful to instantiate on its own.
 
-     """
-
-    button_type = Enum(ButtonType, help="""
-    A style for the button, signifying it's role.
-    """)
+    """
 
 @abstract
 class Group(AbstractGroup):


Test patch: