Repository: bokeh/bokeh

Issue:
deprecate bokeh.models.layouts HBox and VBox



Discussion:

Resolving patch:
diff --git a/bokeh/models/layouts.py b/bokeh/models/layouts.py
--- a/bokeh/models/layouts.py
+++ b/bokeh/models/layouts.py
@@ -13,6 +13,7 @@
 from ..core.validation.warnings import BOTH_CHILD_AND_ROOT, EMPTY_LAYOUT
 from ..embed import notebook_div
 from ..model import Model
+from ..util.deprecation import deprecated
 
 @abstract
 class LayoutDOM(Model):
@@ -201,6 +202,7 @@ def HBox(*args, **kwargs):
 
     Returns a Row instance.
     '''
+    deprecated((0, 12, 5), 'bokeh.models.HBox', 'bokeh.models.Row')
     return Row(*args, **kwargs)
 
 
@@ -212,4 +214,5 @@ def VBox(*args, **kwargs):
 
     Returns a Column instance.
     '''
+    deprecated((0, 12, 5), 'bokeh.models.VBox', 'bokeh.models.Column')
     return Column(*args, **kwargs)
diff --git a/bokeh/models/widgets/panels.py b/bokeh/models/widgets/panels.py
--- a/bokeh/models/widgets/panels.py
+++ b/bokeh/models/widgets/panels.py
@@ -21,7 +21,7 @@ class Panel(Widget):
 
     child = Instance(LayoutDOM, help="""
     The child widget. If you need more children, use a layout widget,
-    e.g. ``HBox`` or ``VBox``.
+    e.g. ``Row`` or ``Column``.
     """)
 
     closable = Bool(False, help="""


Test patch:
diff --git a/bokeh/models/tests/test_layouts.py b/bokeh/models/tests/test_layouts.py
--- a/bokeh/models/tests/test_layouts.py
+++ b/bokeh/models/tests/test_layouts.py
@@ -20,7 +20,7 @@ def check_props_with_sizing_mode(layout):
 
 def check_children_prop(layout_callable):
     ## component subclasses are layouts, widgets and plots
-    components = [HBox(), VBox(), Figure()]
+    components = [Row(), Column(), Figure()]
 
     # Test layout accepts splatted components
     layout1 = layout_callable(*components)
@@ -60,7 +60,7 @@ def test_HBox():
 def test_Row():
     check_props_with_sizing_mode(Row())
     check_children_prop(Row)
-    check_widget_wrapped_in_widget_box(HBox)
+    check_widget_wrapped_in_widget_box(Row)
 
 
 def test_Column():
diff --git a/bokeh/tests/test_objects.py b/bokeh/tests/test_objects.py
--- a/bokeh/tests/test_objects.py
+++ b/bokeh/tests/test_objects.py
@@ -16,11 +16,11 @@ def large_plot(n):
         ColumnDataSource, DataRange1d, PanTool, ZoomInTool, ZoomOutTool, WheelZoomTool, BoxZoomTool,
         BoxSelectTool, ResizeTool, SaveTool, ResetTool
     )
-    from bokeh.models.layouts import VBox
+    from bokeh.models.layouts import Column
     from bokeh.models.glyphs import Line
 
-    vbox = VBox()
-    objects = set([vbox])
+    col = Column()
+    objects = set([col])
 
     for i in xrange(n):
         source = ColumnDataSource(data=dict(x=[0, i + 1], y=[0, i + 1]))
@@ -46,13 +46,13 @@ def large_plot(n):
         reset = ResetTool()
         tools = [pan, zoom_in, zoom_out, wheel_zoom, box_zoom, box_select, resize, save, reset]
         plot.add_tools(*tools)
-        vbox.children.append(plot)
+        col.children.append(plot)
         objects |= set([
             source, xdr, ydr, plot, xaxis, yaxis, xgrid, ygrid, renderer, glyph,
             plot.toolbar, plot.tool_events, plot.title, box_zoom.overlay, box_select.overlay] +
             tickers + tools)
 
-    return vbox, objects
+    return col, objects
 
 
 class TestMetaModel(unittest.TestCase):