I also found a pretty bad bug in _instantiate_param_obj where we were looping only through the __slots__ defined on the Parameter class, ignoring the ones it inherits. Easy mistake, kls.__slots__ should really return all the slots! This bug led ListSelector._objects being shared between a Parameterized class and instance, since the _objects slot is declared in a parent class.
- for s in p.__class__.__slots__:
+ for s in p.__class__._all_slots_:
v = getattr(p, s)
if _is_mutable_container(v) and s != "default":
setattr(p, s, copy.copy(v))
I also made sure that setting None with check_on_set=False and allow_None=True doesn't add None to the objects.
Fixes https://github.com/holoviz/param/issues/872
I also found a pretty bad bug in
_instantiate_param_obj
where we were looping only through the__slots__
defined on the Parameter class, ignoring the ones it inherits. Easy mistake,kls.__slots__
should really return all the slots! This bug ledListSelector._objects
being shared between a Parameterized class and instance, since the_objects
slot is declared in a parent class.I also made sure that setting
None
withcheck_on_set=False
andallow_None=True
doesn't addNone
to the objects.