Repository: holoviz/panel

Issue:
None of the sliders support value_throttled in pn.depends decorator
As described in 

https://discourse.holoviz.org/t/value-throttled-not-working-when-updating-from-0-10-to-0-11/1977/2

when I updated panel from version 0.10 to 0.11 the param.value_throttled option in the decorator does not work anymore in any of the sliders widgets. 


```
import panel as pn, math
import datetime as dt
print (pn.__version__)

date_range_slider = pn.widgets.DateRangeSlider(
    name='Date Range Slider',
    start=dt.datetime(2017, 1, 1), end=dt.datetime(2019, 1, 1),
    value=(dt.datetime(2017, 1, 1), dt.datetime(2018, 1, 10))
)

@pn.depends(date_range_slider.param.value_throttled, watch=True)
def test_throttled_1(v1):
    print (v1)


date_slider = pn.widgets.DateSlider(name='Date Slider', 
        start=dt.datetime(2019, 1, 1), end=dt.datetime(2019, 6, 1), 
        value=dt.datetime(2019, 2, 8))

@pn.depends(date_slider.param.value_throttled, watch=True)
def test_throttled_2(v1):
    print (v1)


discrete_slider = pn.widgets.DiscreteSlider(name='Discrete Slider',
             options=[2, 4, 8, 16, 32, 64, 128], value=32)

@pn.depends(discrete_slider.param.value_throttled, watch=True)
def test_throttled_3(v1):
    print (v1)


int_range_slider = pn.widgets.IntRangeSlider(
    name='Integer Range Slider',
    start=0, end=10, value=(2, 8), step=2)

@pn.depends(int_range_slider.param.value_throttled, watch=True)
def test_throttled_4(v1):
    print (v1)

int_slider = pn.widgets.IntSlider(name='Integer Slider', 
            start=0, end=8, step=2, value=4)

@pn.depends(int_slider.param.value_throttled, watch=True)
def test_throttled_5(v1):
    print (v1)

range_slider = pn.widgets.RangeSlider(
    name='Range Slider', start=0, end=math.pi, 
    value=(math.pi/4., math.pi/2.), step=0.01)

@pn.depends(range_slider.param.value_throttled, watch=True)
def test_throttled_6(v1):
    print (v1)


pn.Column(date_range_slider, 
        date_slider, 
        discrete_slider,
        int_range_slider,
        int_slider,
        range_slider
).servable()

```

For the FloatSlider  @Hoxbro presented a solution, but the implementation is different in each one of the sliders. 






Discussion:

Resolving patch:
diff --git a/panel/widgets/input.py b/panel/widgets/input.py
--- a/panel/widgets/input.py
+++ b/panel/widgets/input.py
@@ -19,7 +19,7 @@
     NumericInput as _BkNumericInput)
 
 from ..layout import Column
-from ..util import as_unicode
+from ..util import param_reprs, as_unicode
 from .base import Widget, CompositeWidget
 
 
@@ -245,6 +245,16 @@ def __init__(self, **params):
             params['value_throttled'] = params['value']
         super().__init__(**params)
 
+    def __repr__(self, depth=0):
+        return '{cls}({params})'.format(cls=type(self).__name__,
+                                        params=', '.join(param_reprs(self, ['value_throttled'])))
+
+    def _update_model(self, events, msg, root, model, doc, comm):
+        if 'value_throttled' in msg:
+            del msg['value_throttled']
+
+        return super()._update_model(events, msg, root, model, doc, comm)
+
 
 class IntInput(_SpinnerBase, _IntInputBase):
 
@@ -252,9 +262,6 @@ class IntInput(_SpinnerBase, _IntInputBase):
 
     value_throttled = param.Integer(default=None, constant=True)
 
-    _rename = dict(_NumericInputBase._rename, value_throttled=None)
-
-
 
 class FloatInput(_SpinnerBase, _FloatInputBase):
 
@@ -262,8 +269,6 @@ class FloatInput(_SpinnerBase, _FloatInputBase):
 
     value_throttled = param.Number(default=None, constant=True)
 
-    _rename = dict(_NumericInputBase._rename, value_throttled=None)
-
 
 class NumberInput(_SpinnerBase):
 
diff --git a/panel/widgets/slider.py b/panel/widgets/slider.py
--- a/panel/widgets/slider.py
+++ b/panel/widgets/slider.py
@@ -16,14 +16,13 @@
 
 from ..config import config
 from ..io import state
-from ..util import unicode_repr, value_as_datetime, value_as_date
+from ..util import param_reprs, unicode_repr, value_as_datetime, value_as_date
 from ..viewable import Layoutable
 from .base import Widget, CompositeWidget
 from ..layout import Column
 from .input import StaticText
 
 
-
 class _SliderBase(Widget):
 
     bar_color = param.Color(default="#e6e6e6", doc="""
@@ -54,6 +53,16 @@ def __init__(self, **params):
             params['value_throttled'] = params['value']
         super().__init__(**params)
 
+    def __repr__(self, depth=0):
+        return '{cls}({params})'.format(cls=type(self).__name__,
+                                        params=', '.join(param_reprs(self, ['value_throttled'])))
+
+    def _update_model(self, events, msg, root, model, doc, comm):
+        if 'value_throttled' in msg:
+            del msg['value_throttled']
+
+        return super()._update_model(events, msg, root, model, doc, comm)
+
 
 class ContinuousSlider(_SliderBase):
 
@@ -116,7 +125,7 @@ class FloatSlider(ContinuousSlider):
 
     step = param.Number(default=0.1)
 
-    _rename = {'name': 'title', 'value_throttled': None}
+    _rename = {'name': 'title'}
 
 
 class IntSlider(ContinuousSlider):
@@ -131,7 +140,7 @@ class IntSlider(ContinuousSlider):
 
     step = param.Integer(default=1)
 
-    _rename = {'name': 'title', 'value_throttled': None}
+    _rename = {'name': 'title'}
 
     def _process_property_change(self, msg):
         msg = super(_SliderBase, self)._process_property_change(msg)
@@ -153,7 +162,7 @@ class DateSlider(_SliderBase):
 
     end = param.Date(default=None)
 
-    _rename = {'name': 'title', 'value_throttled': None}
+    _rename = {'name': 'title'}
 
     _source_transforms = {'value': None, 'value_throttled': None, 'start': None, 'end': None}
 
@@ -349,7 +358,7 @@ class RangeSlider(_SliderBase):
 
     step = param.Number(default=0.1)
 
-    _rename = {'name': 'title', 'value_throttled': None}
+    _rename = {'name': 'title'}
 
     _widget_type = _BkRangeSlider
 
@@ -406,7 +415,7 @@ class DateRangeSlider(_SliderBase):
     _source_transforms = {'value': None, 'value_throttled': None,
                          'start': None, 'end': None, 'step': None}
 
-    _rename = {'name': 'title', 'value_throttled': None}
+    _rename = {'name': 'title'}
 
     _widget_type = _BkDateRangeSlider
 
@@ -420,6 +429,8 @@ def _process_param_change(self, msg):
         msg = super()._process_param_change(msg)
         if msg.get('value') == (None, None):
             del msg['value']
+        if msg.get('value_throttled') == (None, None):
+            del msg['value_throttled']
         return msg
 
     def _process_property_change(self, msg):


Test patch: