diff --git a/holoviews/core/dimension.py b/holoviews/core/dimension.py index 58b6c25637..50f2c0806f 100644 --- a/holoviews/core/dimension.py +++ b/holoviews/core/dimension.py @@ -14,11 +14,11 @@ from ..core.util import (basestring, sanitize_identifier, group_sanitizer, label_sanitizer, max_range, find_range, dimension_sanitizer, OrderedDict, - bytes_to_unicode, unicode, dt64_to_dt, unique_array) + bytes_to_unicode, unicode, dt64_to_dt, unique_array, + builtin) from .options import Store, StoreOptions from .pprint import PrettyPrinter -obj_id = id # Alias parameter support for pickle loading ALIASES = {'key_dimensions': 'kdims', 'value_dimensions': 'vdims', @@ -489,7 +489,7 @@ def __init__(self, data, id=None, plot_id=None, **params): """ self.data = data self.id = id - self._plot_id = plot_id or obj_id(self) + self._plot_id = plot_id or builtin.id(self) if isinstance(params.get('label',None), tuple): (alias, long_name) = params['label'] label_sanitizer.add_aliases(**{alias:long_name}) diff --git a/holoviews/core/util.py b/holoviews/core/util.py index f8d3eca4e1..6e2f6cb89f 100644 --- a/holoviews/core/util.py +++ b/holoviews/core/util.py @@ -22,6 +22,11 @@ except: from collections import OrderedDict +try: + import builtin +except: + import builtins as builtin + datetime_types = (np.datetime64, dt.datetime) try: diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py index 3a56c57e6b..c65eecd30d 100644 --- a/holoviews/plotting/bokeh/element.py +++ b/holoviews/plotting/bokeh/element.py @@ -804,7 +804,7 @@ def update_frame(self, key, ranges=None, plot=None, element=None, empty=False): # Cache frame object id to skip updating data if unchanged previous_id = self.handles.get('previous_id', None) if self.batched: - current_id = sum(element.traverse(lambda x: x._plot_id, [Element])) + current_id = tuple(element.traverse(lambda x: x._plot_id, [Element])) else: current_id = element._plot_id self.handles['previous_id'] = current_id diff --git a/holoviews/plotting/bokeh/tabular.py b/holoviews/plotting/bokeh/tabular.py index 268fd33e4e..b2cf0eb1af 100644 --- a/holoviews/plotting/bokeh/tabular.py +++ b/holoviews/plotting/bokeh/tabular.py @@ -76,7 +76,7 @@ def current_handles(self): element = self.current_frame previous_id = self.handles.get('previous_id', None) - current_id = None if self.current_frame is None else id(element)+id(element.data) + current_id = None if self.current_frame is None else element._plot_id for handle in self._update_handles: if (handle == 'source' and self.dynamic and current_id == previous_id): continue