Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression in ListSelector with check_on_set=False #874

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Oct 8, 2023

Fixes #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 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.

@maximlt
Copy link
Member Author

maximlt commented Oct 10, 2023

Merging to prepare a new release candidate.

@maximlt maximlt merged commit 31f71c3 into main Oct 10, 2023
10 checks passed
@maximlt maximlt deleted the fix_listselector_checkonset branch October 10, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.0.0rc6 - param.ListSelector Issue
1 participant