Repository: bokeh/bokeh

Issue:
bokeh.plotting.patches line_dash argument only takes a list
The `bokeh.plotting.patches` renderer requires the argument to `line_dash` to be a list, it should probably take list and tuple

Discussion:

Patch:
diff --git a/bokeh/properties.py b/bokeh/properties.py
index a7304e85d..d234beeb3 100644
--- a/bokeh/properties.py
+++ b/bokeh/properties.py
@@ -1091,7 +1091,7 @@ class DashPattern(Either):
     }
 
     def __init__(self, default=[], help=None):
-        types = Enum(enums.DashPattern), Regex(r"^(\d+(\s+\d+)*)?$"), List(Int)
+        types = Enum(enums.DashPattern), Regex(r"^(\d+(\s+\d+)*)?$"), Seq(Int)
         super(DashPattern, self).__init__(*types, default=default, help=help)
 
     def transform(self, value):


Test patch:
diff --git a/bokeh/tests/test_properties.py b/bokeh/tests/test_properties.py
index a520745b3..08b27b501 100644
--- a/bokeh/tests/test_properties.py
+++ b/bokeh/tests/test_properties.py
@@ -330,6 +330,25 @@ class TestDashPattern(unittest.TestCase):
         with self.assertRaises(ValueError):
             f.pat = [2, "a"]
 
+    def test_list(self):
+        class Foo(HasProps):
+            pat = DashPattern
+        f = Foo()
+
+        f.pat = ()
+        self.assertEqual(f.pat, ())
+        f.pat = (2,)
+        self.assertEqual(f.pat, (2,))
+        f.pat = (2, 4)
+        self.assertEqual(f.pat, (2, 4))
+        f.pat = (2, 4, 6)
+        self.assertEqual(f.pat, (2, 4, 6))
+
+        with self.assertRaises(ValueError):
+            f.pat = (2, 4.2)
+        with self.assertRaises(ValueError):
+            f.pat = (2, "a")
+
     def test_invalid(self):
         class Foo(HasProps):
             pat = DashPattern
@@ -764,7 +783,7 @@ class TestProperties(unittest.TestCase):
         self.assertFalse(prop.is_valid(1.0))
         self.assertFalse(prop.is_valid(1.0+1.0j))
         self.assertTrue(prop.is_valid(""))
-        self.assertFalse(prop.is_valid(()))
+        self.assertTrue(prop.is_valid(()))
         self.assertTrue(prop.is_valid([]))
         self.assertFalse(prop.is_valid({}))
         self.assertFalse(prop.is_valid(Foo()))