We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make editable sliders name parameter editable (from python)
Editable sliders are a very nice addition to panel components and can advantageously replace conventional sliders in most cases in my opinion. However there is a difference currently with respect to the name parameter, which is constant in editable sliders while it is not in conventional sliders.

As in my app I use sliders which have their name changed programmatically, I would like to know if editable sliders could be modified so that the name parameter is no longer constant? In general I think it's best to make editable sliders behave identically to their non-editable counterparts as far as practicable.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `panel/widgets/base.py`
Content:
```
1 """
2 Defines the Widget base class which provides bi-directional
3 communication between the rendered dashboard and the Widget
4 parameters.
5 """
6 import param
7 
8 from ..layout import Row
9 from ..reactive import Reactive
10 from ..viewable import Layoutable
11 
12 
13 class Widget(Reactive):
14     """
15     Widgets allow syncing changes in bokeh widget models with the
16     parameters on the Widget instance.
17     """
18 
19     disabled = param.Boolean(default=False, doc="""
20        Whether the widget is disabled.""")
21 
22     name = param.String(default='')
23 
24     height = param.Integer(default=None, bounds=(0, None))
25 
26     width = param.Integer(default=None, bounds=(0, None))
27 
28     margin = param.Parameter(default=(5, 10), doc="""
29         Allows to create additional space around the component. May
30         be specified as a two-tuple of the form (vertical, horizontal)
31         or a four-tuple (top, right, bottom, left).""")
32 
33     _rename = {'name': 'title'}
34     
35     # Whether the widget supports embedding
36     _supports_embed = False
37 
38     # Declares the Bokeh model type of the widget
39     _widget_type = None
40 
41     __abstract = True
42 
43     def __init__(self, **params):
44         if 'name' not in params:
45             params['name'] = ''
46         if '_supports_embed' in params:
47             self._supports_embed = params.pop('_supports_embed')
48         if '_param_pane' in params:
49             self._param_pane = params.pop('_param_pane')
50         else:
51             self._param_pane = None
52         super().__init__(**params)
53 
54     @classmethod
55     def from_param(cls, parameter, **params):
56         """
57         Construct a widget from a Parameter and link the two
58         bi-directionally.
59         
60         Parameters
61         ----------
62         parameter: param.Parameter
63           A parameter to create the widget from.
64         params: dict
65           Keyword arguments to be passed to the widget constructor
66         
67         Returns
68         -------
69         Widget instance linked to the supplied parameter
70         """
71         from ..param import Param
72         layout = Param(parameter, widgets={parameter.name: dict(type=cls, **params)})
73         return layout[0]
74 
75     def _get_model(self, doc, root=None, parent=None, comm=None):
76         model = self._widget_type(**self._process_param_change(self._init_params()))
77         if root is None:
78             root = model
79         # Link parameters and bokeh model
80         values = dict(self.param.get_param_values())
81         properties = self._filter_properties(list(self._process_param_change(values)))
82         self._models[root.ref['id']] = (model, parent)
83         self._link_props(model, properties, doc, root, comm)
84         return model
85 
86     def _filter_properties(self, properties):
87         ignored = list(Layoutable.param)+['loading']
88         return [p for p in properties if p not in ignored]
89 
90     def _get_embed_state(self, root, values=None, max_opts=3):
91         """
92         Returns the bokeh model and a discrete set of value states
93         for the widget.
94 
95         Arguments
96         ---------
97         root: bokeh.model.Model
98           The root model of the widget
99         values: list (optional)
100           An explicit list of value states to embed
101         max_opts: int
102           The maximum number of states the widget should return
103 
104         Returns
105         -------
106         widget: panel.widget.Widget
107           The Panel widget instance to modify to effect state changes
108         model: bokeh.model.Model
109           The bokeh model to record the current value state on
110         values: list
111           A list of value states to explore.
112         getter: callable
113           A function that returns the state value given the model
114         on_change: string
115           The name of the widget property to attach a callback on
116         js_getter: string
117           JS snippet that returns the state value given the model
118         """
119 
120 
121 class CompositeWidget(Widget):
122     """
123     A baseclass for widgets which are made up of two or more other
124     widgets
125     """
126 
127     __abstract = True
128 
129     _composite_type = Row
130 
131     def __init__(self, **params):
132         super().__init__(**params)
133         layout = {p: getattr(self, p) for p in Layoutable.param
134                   if getattr(self, p) is not None}
135         if layout.get('width', self.width) is None and not 'sizing_mode' in layout:
136             layout['sizing_mode'] = 'stretch_width'
137         self._composite = self._composite_type(**layout)
138         self._models = self._composite._models
139         self.param.watch(self._update_layout_params, list(Layoutable.param))
140 
141     def _update_layout_params(self, *events):
142         updates = {event.name: event.new for event in events}
143         self._composite.param.set_param(**updates)
144 
145     def select(self, selector=None):
146         """
147         Iterates over the Viewable and any potential children in the
148         applying the Selector.
149 
150         Arguments
151         ---------
152         selector: type or callable or None
153           The selector allows selecting a subset of Viewables by
154           declaring a type or callable function to filter by.
155 
156         Returns
157         -------
158         viewables: list(Viewable)
159         """
160         objects = super().select(selector)
161         for obj in self._composite.objects:
162             objects += obj.select(selector)
163         return objects
164 
165     def _cleanup(self, root):
166         self._composite._cleanup(root)
167         super()._cleanup(root)
168 
169     def _get_model(self, doc, root=None, parent=None, comm=None):
170         model = self._composite._get_model(doc, root, parent, comm)
171         if root is None:
172             root = parent = model
173         self._models[root.ref['id']] = (model, parent)
174         return model
175 
176     def __contains__(self, object):
177         return object in self._composite.objects
178 
179     @property
180     def _synced_params(self):
181         return []
182
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/panel/widgets/base.py b/panel/widgets/base.py
--- a/panel/widgets/base.py
+++ b/panel/widgets/base.py
@@ -130,13 +130,14 @@
 
     def __init__(self, **params):
         super().__init__(**params)
-        layout = {p: getattr(self, p) for p in Layoutable.param
+        layout_params = [p for p in Layoutable.param if p != 'name']
+        layout = {p: getattr(self, p) for p in layout_params
                   if getattr(self, p) is not None}
         if layout.get('width', self.width) is None and not 'sizing_mode' in layout:
             layout['sizing_mode'] = 'stretch_width'
         self._composite = self._composite_type(**layout)
         self._models = self._composite._models
-        self.param.watch(self._update_layout_params, list(Layoutable.param))
+        self.param.watch(self._update_layout_params, layout_params)
 
     def _update_layout_params(self, *events):
         updates = {event.name: event.new for event in events}

{"golden_diff": "diff --git a/panel/widgets/base.py b/panel/widgets/base.py\n--- a/panel/widgets/base.py\n+++ b/panel/widgets/base.py\n@@ -130,13 +130,14 @@\n \n     def __init__(self, **params):\n         super().__init__(**params)\n-        layout = {p: getattr(self, p) for p in Layoutable.param\n+        layout_params = [p for p in Layoutable.param if p != 'name']\n+        layout = {p: getattr(self, p) for p in layout_params\n                   if getattr(self, p) is not None}\n         if layout.get('width', self.width) is None and not 'sizing_mode' in layout:\n             layout['sizing_mode'] = 'stretch_width'\n         self._composite = self._composite_type(**layout)\n         self._models = self._composite._models\n-        self.param.watch(self._update_layout_params, list(Layoutable.param))\n+        self.param.watch(self._update_layout_params, layout_params)\n \n     def _update_layout_params(self, *events):\n         updates = {event.name: event.new for event in events}\n", "issue": "Make editable sliders name parameter editable (from python)\nEditable sliders are a very nice addition to panel components and can advantageously replace conventional sliders in most cases in my opinion. However there is a difference currently with respect to the name parameter, which is constant in editable sliders while it is not in conventional sliders.\r\n\r\nAs in my app I use sliders which have their name changed programmatically, I would like to know if editable sliders could be modified so that the name parameter is no longer constant? In general I think it's best to make editable sliders behave identically to their non-editable counterparts as far as practicable.\n", "before_files": [{"content": "\"\"\"\nDefines the Widget base class which provides bi-directional\ncommunication between the rendered dashboard and the Widget\nparameters.\n\"\"\"\nimport param\n\nfrom ..layout import Row\nfrom ..reactive import Reactive\nfrom ..viewable import Layoutable\n\n\nclass Widget(Reactive):\n    \"\"\"\n    Widgets allow syncing changes in bokeh widget models with the\n    parameters on the Widget instance.\n    \"\"\"\n\n    disabled = param.Boolean(default=False, doc=\"\"\"\n       Whether the widget is disabled.\"\"\")\n\n    name = param.String(default='')\n\n    height = param.Integer(default=None, bounds=(0, None))\n\n    width = param.Integer(default=None, bounds=(0, None))\n\n    margin = param.Parameter(default=(5, 10), doc=\"\"\"\n        Allows to create additional space around the component. May\n        be specified as a two-tuple of the form (vertical, horizontal)\n        or a four-tuple (top, right, bottom, left).\"\"\")\n\n    _rename = {'name': 'title'}\n    \n    # Whether the widget supports embedding\n    _supports_embed = False\n\n    # Declares the Bokeh model type of the widget\n    _widget_type = None\n\n    __abstract = True\n\n    def __init__(self, **params):\n        if 'name' not in params:\n            params['name'] = ''\n        if '_supports_embed' in params:\n            self._supports_embed = params.pop('_supports_embed')\n        if '_param_pane' in params:\n            self._param_pane = params.pop('_param_pane')\n        else:\n            self._param_pane = None\n        super().__init__(**params)\n\n    @classmethod\n    def from_param(cls, parameter, **params):\n        \"\"\"\n        Construct a widget from a Parameter and link the two\n        bi-directionally.\n        \n        Parameters\n        ----------\n        parameter: param.Parameter\n          A parameter to create the widget from.\n        params: dict\n          Keyword arguments to be passed to the widget constructor\n        \n        Returns\n        -------\n        Widget instance linked to the supplied parameter\n        \"\"\"\n        from ..param import Param\n        layout = Param(parameter, widgets={parameter.name: dict(type=cls, **params)})\n        return layout[0]\n\n    def _get_model(self, doc, root=None, parent=None, comm=None):\n        model = self._widget_type(**self._process_param_change(self._init_params()))\n        if root is None:\n            root = model\n        # Link parameters and bokeh model\n        values = dict(self.param.get_param_values())\n        properties = self._filter_properties(list(self._process_param_change(values)))\n        self._models[root.ref['id']] = (model, parent)\n        self._link_props(model, properties, doc, root, comm)\n        return model\n\n    def _filter_properties(self, properties):\n        ignored = list(Layoutable.param)+['loading']\n        return [p for p in properties if p not in ignored]\n\n    def _get_embed_state(self, root, values=None, max_opts=3):\n        \"\"\"\n        Returns the bokeh model and a discrete set of value states\n        for the widget.\n\n        Arguments\n        ---------\n        root: bokeh.model.Model\n          The root model of the widget\n        values: list (optional)\n          An explicit list of value states to embed\n        max_opts: int\n          The maximum number of states the widget should return\n\n        Returns\n        -------\n        widget: panel.widget.Widget\n          The Panel widget instance to modify to effect state changes\n        model: bokeh.model.Model\n          The bokeh model to record the current value state on\n        values: list\n          A list of value states to explore.\n        getter: callable\n          A function that returns the state value given the model\n        on_change: string\n          The name of the widget property to attach a callback on\n        js_getter: string\n          JS snippet that returns the state value given the model\n        \"\"\"\n\n\nclass CompositeWidget(Widget):\n    \"\"\"\n    A baseclass for widgets which are made up of two or more other\n    widgets\n    \"\"\"\n\n    __abstract = True\n\n    _composite_type = Row\n\n    def __init__(self, **params):\n        super().__init__(**params)\n        layout = {p: getattr(self, p) for p in Layoutable.param\n                  if getattr(self, p) is not None}\n        if layout.get('width', self.width) is None and not 'sizing_mode' in layout:\n            layout['sizing_mode'] = 'stretch_width'\n        self._composite = self._composite_type(**layout)\n        self._models = self._composite._models\n        self.param.watch(self._update_layout_params, list(Layoutable.param))\n\n    def _update_layout_params(self, *events):\n        updates = {event.name: event.new for event in events}\n        self._composite.param.set_param(**updates)\n\n    def select(self, selector=None):\n        \"\"\"\n        Iterates over the Viewable and any potential children in the\n        applying the Selector.\n\n        Arguments\n        ---------\n        selector: type or callable or None\n          The selector allows selecting a subset of Viewables by\n          declaring a type or callable function to filter by.\n\n        Returns\n        -------\n        viewables: list(Viewable)\n        \"\"\"\n        objects = super().select(selector)\n        for obj in self._composite.objects:\n            objects += obj.select(selector)\n        return objects\n\n    def _cleanup(self, root):\n        self._composite._cleanup(root)\n        super()._cleanup(root)\n\n    def _get_model(self, doc, root=None, parent=None, comm=None):\n        model = self._composite._get_model(doc, root, parent, comm)\n        if root is None:\n            root = parent = model\n        self._models[root.ref['id']] = (model, parent)\n        return model\n\n    def __contains__(self, object):\n        return object in self._composite.objects\n\n    @property\n    def _synced_params(self):\n        return []\n", "path": "panel/widgets/base.py"}], "after_files": [{"content": "\"\"\"\nDefines the Widget base class which provides bi-directional\ncommunication between the rendered dashboard and the Widget\nparameters.\n\"\"\"\nimport param\n\nfrom ..layout import Row\nfrom ..reactive import Reactive\nfrom ..viewable import Layoutable\n\n\nclass Widget(Reactive):\n    \"\"\"\n    Widgets allow syncing changes in bokeh widget models with the\n    parameters on the Widget instance.\n    \"\"\"\n\n    disabled = param.Boolean(default=False, doc=\"\"\"\n       Whether the widget is disabled.\"\"\")\n\n    name = param.String(default='')\n\n    height = param.Integer(default=None, bounds=(0, None))\n\n    width = param.Integer(default=None, bounds=(0, None))\n\n    margin = param.Parameter(default=(5, 10), doc=\"\"\"\n        Allows to create additional space around the component. May\n        be specified as a two-tuple of the form (vertical, horizontal)\n        or a four-tuple (top, right, bottom, left).\"\"\")\n\n    _rename = {'name': 'title'}\n    \n    # Whether the widget supports embedding\n    _supports_embed = False\n\n    # Declares the Bokeh model type of the widget\n    _widget_type = None\n\n    __abstract = True\n\n    def __init__(self, **params):\n        if 'name' not in params:\n            params['name'] = ''\n        if '_supports_embed' in params:\n            self._supports_embed = params.pop('_supports_embed')\n        if '_param_pane' in params:\n            self._param_pane = params.pop('_param_pane')\n        else:\n            self._param_pane = None\n        super().__init__(**params)\n\n    @classmethod\n    def from_param(cls, parameter, **params):\n        \"\"\"\n        Construct a widget from a Parameter and link the two\n        bi-directionally.\n        \n        Parameters\n        ----------\n        parameter: param.Parameter\n          A parameter to create the widget from.\n        params: dict\n          Keyword arguments to be passed to the widget constructor\n        \n        Returns\n        -------\n        Widget instance linked to the supplied parameter\n        \"\"\"\n        from ..param import Param\n        layout = Param(parameter, widgets={parameter.name: dict(type=cls, **params)})\n        return layout[0]\n\n    def _get_model(self, doc, root=None, parent=None, comm=None):\n        model = self._widget_type(**self._process_param_change(self._init_params()))\n        if root is None:\n            root = model\n        # Link parameters and bokeh model\n        values = dict(self.param.get_param_values())\n        properties = self._filter_properties(list(self._process_param_change(values)))\n        self._models[root.ref['id']] = (model, parent)\n        self._link_props(model, properties, doc, root, comm)\n        return model\n\n    def _filter_properties(self, properties):\n        ignored = list(Layoutable.param)+['loading']\n        return [p for p in properties if p not in ignored]\n\n    def _get_embed_state(self, root, values=None, max_opts=3):\n        \"\"\"\n        Returns the bokeh model and a discrete set of value states\n        for the widget.\n\n        Arguments\n        ---------\n        root: bokeh.model.Model\n          The root model of the widget\n        values: list (optional)\n          An explicit list of value states to embed\n        max_opts: int\n          The maximum number of states the widget should return\n\n        Returns\n        -------\n        widget: panel.widget.Widget\n          The Panel widget instance to modify to effect state changes\n        model: bokeh.model.Model\n          The bokeh model to record the current value state on\n        values: list\n          A list of value states to explore.\n        getter: callable\n          A function that returns the state value given the model\n        on_change: string\n          The name of the widget property to attach a callback on\n        js_getter: string\n          JS snippet that returns the state value given the model\n        \"\"\"\n\n\nclass CompositeWidget(Widget):\n    \"\"\"\n    A baseclass for widgets which are made up of two or more other\n    widgets\n    \"\"\"\n\n    __abstract = True\n\n    _composite_type = Row\n\n    def __init__(self, **params):\n        super().__init__(**params)\n        layout_params = [p for p in Layoutable.param if p != 'name']\n        layout = {p: getattr(self, p) for p in layout_params\n                  if getattr(self, p) is not None}\n        if layout.get('width', self.width) is None and not 'sizing_mode' in layout:\n            layout['sizing_mode'] = 'stretch_width'\n        self._composite = self._composite_type(**layout)\n        self._models = self._composite._models\n        self.param.watch(self._update_layout_params, layout_params)\n\n    def _update_layout_params(self, *events):\n        updates = {event.name: event.new for event in events}\n        self._composite.param.set_param(**updates)\n\n    def select(self, selector=None):\n        \"\"\"\n        Iterates over the Viewable and any potential children in the\n        applying the Selector.\n\n        Arguments\n        ---------\n        selector: type or callable or None\n          The selector allows selecting a subset of Viewables by\n          declaring a type or callable function to filter by.\n\n        Returns\n        -------\n        viewables: list(Viewable)\n        \"\"\"\n        objects = super().select(selector)\n        for obj in self._composite.objects:\n            objects += obj.select(selector)\n        return objects\n\n    def _cleanup(self, root):\n        self._composite._cleanup(root)\n        super()._cleanup(root)\n\n    def _get_model(self, doc, root=None, parent=None, comm=None):\n        model = self._composite._get_model(doc, root, parent, comm)\n        if root is None:\n            root = parent = model\n        self._models[root.ref['id']] = (model, parent)\n        return model\n\n    def __contains__(self, object):\n        return object in self._composite.objects\n\n    @property\n    def _synced_params(self):\n        return []\n", "path": "panel/widgets/base.py"}]}