Repository: bokeh/bokeh

Issue:
Categorical charts use `:` to set categories
This currently raises the following warning:

``` Python
ERROR:/Users/fpliger/dev/repos/bokeh/bokeh/validation/check.pyc:W-1003 (MALFORMED_CATEGORY_LABEL): Category labels are malformed: [field:catjython] [first_value: 1st:0.75] [renderer: GlyphRenderer, ViewModel:GlyphRenderer, ref _id: 39fc4fdf-5247-4388-9ec0-5a15825ee4ae]
```

and will break in `0.10`. 



Discussion:

Resolving patch:
diff --git a/bokeh/models/renderers.py b/bokeh/models/renderers.py
--- a/bokeh/models/renderers.py
+++ b/bokeh/models/renderers.py
@@ -6,14 +6,11 @@
 
 import logging
 
-from six import string_types
-
 from ..plot_object import PlotObject
 from ..properties import abstract
 from ..properties import String, Enum, Instance
 from ..enums import Units, RenderLevel
 from ..validation.errors import BAD_COLUMN_NAME, MISSING_GLYPH, NO_SOURCE_FOR_GLYPH
-from ..validation.warnings import MALFORMED_CATEGORY_LABEL
 from .. import validation
 
 from .sources import DataSource
@@ -54,34 +51,6 @@ def _check_bad_column_name(self):
         if missing:
             return "%s [renderer: %s]" % (", ".join(sorted(missing)), self)
 
-    @validation.warning(MALFORMED_CATEGORY_LABEL)
-    def _check_colon_in_category_label(self):
-        if not self.glyph: return
-        if not self.data_source: return
-        vm = self.glyph.vm_serialize()
-        labels = (label for label in ['x', 'y']
-                  if label in vm and 'field' in vm[label])
-
-        broken = []
-
-        for label in labels:
-            try:
-                for value in self.data_source.data[vm[label]['field']]:
-                    if not isinstance(value, string_types): break
-                    if ':' in value:
-                        broken.append((vm[label]['field'], value))
-                        break
-            except KeyError:
-                logging.info(
-                    'Can\'t check category labels for %s data source',
-                    self.data_source
-                )
-
-        if broken:
-            field_msg = ' '.join('[field:%s] [first_value: %s]' % (field, value)
-                                 for field, value in broken)
-            return '%s [renderer: %s]' % (field_msg, self)
-
     data_source = Instance(DataSource, help="""
     Local data source to use when rendering glyphs on the plot.
     """)
diff --git a/bokeh/validation/warnings.py b/bokeh/validation/warnings.py
--- a/bokeh/validation/warnings.py
+++ b/bokeh/validation/warnings.py
@@ -10,7 +10,7 @@
     A layout model has no children (will result in a blank layout).
 
 1003 : *MALFORMED_CATEGORY_LABEL*
-    Category labels are malformed (will result in a blank layout).
+    Category labels cannot contain colons (will result in a blank layout).
 
 9999 : *EXT*
     Indicates that a custom warning check has failed.
@@ -21,7 +21,7 @@
     1000: ("MISSING_RENDERERS",         "Plot has no renderers"),
     1001: ("NO_GLYPH_RENDERERS",        "Plot has no glyph renderers"),
     1002: ("EMPTY_LAYOUT",              "Layout has no children"),
-    1003: ("MALFORMED_CATEGORY_LABEL",  "Category labels are malformed"),
+    1003: ("MALFORMED_CATEGORY_LABEL",  "Category labels cannot contain colons"),
     9999: ("EXT",                       "Custom extension reports warning"),
 }
 


Test patch:
diff --git a/bokeh/models/tests/test_renderers.py b/bokeh/models/tests/test_renderers.py
--- a/bokeh/models/tests/test_renderers.py
+++ b/bokeh/models/tests/test_renderers.py
@@ -2,33 +2,13 @@
 
 import unittest
 
-from bokeh.models.renderers import GlyphRenderer
-from bokeh.plotting import ColumnDataSource, figure
+from bokeh.plotting import figure
 from bokeh.models.ranges import DataRange1d
 
 
 class TestGlyphRenderer(unittest.TestCase):
-    def test_warning_about_colons_in_column_labels(self):
-        invalid_labels = ['0', '1:0']
-        ds = ColumnDataSource(data={'a': invalid_labels, 'b': invalid_labels})
-        plot = figure()
-        plot.rect('a', 'b', 1, 1, source=ds)
-        renderer = plot.select({'type': GlyphRenderer})[0]
-
-        errors = renderer._check_colon_in_category_label()
-
-        self.assertEqual(errors, [(
-            1003,
-            'MALFORMED_CATEGORY_LABEL',
-            'Category labels are malformed',
-            '[field:a] [first_value: 1:0] [field:b] [first_value: 1:0] '
-            '[renderer: '
-            'GlyphRenderer, ViewModel:GlyphRenderer, ref _id: '
-            '%s]' % renderer._id
-        )])
-
     def test_warning_about_colons_in_column_labels_for_axis(self):
-        invalid_labels = ['0', '1', '2:0'] 
+        invalid_labels = ['0', '1', '2:0']
         plot = figure(
             x_range=invalid_labels,
             y_range=invalid_labels,
@@ -41,7 +21,7 @@ def test_warning_about_colons_in_column_labels_for_axis(self):
         self.assertEqual(errors, [(
             1003,
             'MALFORMED_CATEGORY_LABEL',
-            'Category labels are malformed',
+            'Category labels cannot contain colons',
             '[range:x_range] [first_value: 2:0] '
             '[range:y_range] [first_value: 2:0] '
             '[renderer: Figure, ViewModel:Plot, ref _id: '
@@ -61,7 +41,7 @@ def test_validates_colons_only_in_factorial_range(self):
         self.assertEqual(errors, [(
             1003,
             'MALFORMED_CATEGORY_LABEL',
-            'Category labels are malformed',
+            'Category labels cannot contain colons',
             '[range:y_range] [first_value: 2:0] '
             '[renderer: Figure, ViewModel:Plot, ref _id: '
             '%s]' % plot._id