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 issues due to the Parameterized private namespace #790

Merged
merged 8 commits into from
Jul 21, 2023

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Jul 12, 2023

#766 was merged too quickly, running the HoloViews test suite locally revealed a bunch of new errors:

  • setting an attribute in the __init__ before calling super().__init__ wasn't exerted in Param's test suite but leveraged in HoloViews (https://github.com/holoviz/holoviews/blob/a64cfc544acc94b3806d427912047ca660253587/holoviews/plotting/plot.py#L1168). This is now supported again and tested.
  • the private namespace broke pickling when the protocol 0 is used which is apparently used by HoloViews in some cases. This PR fixes the support for that protocol, at least in the sense that the HoloViews unit test suite should now pass. To complete that fix, I have had to remove the compatibility code on Watcher that allowed to exclude precedence while unpacking (added in Add compatibility layer for Param watcher precedence #557). I believe that compatibility code is no longer required for Panel. The code in Param was released in 1.12.0 and Panel 0.13.0, which depended on Param >= 1.12.0, was released with updated code that no longer required the compatibility code (Compatibility for latest Param panel#2809). I had to remove that code as, I think, __iter__ was called both when pickling and unpickling, resulting in the last two attributes being filtered out (error I got: TypeError: __new__() missing 1 required positional argument: 'queued'). I would hope no other Param dependents relied on that compatibility code like Panel used to do, and if they did I don't feel too bad breaking that for Param 2.0.

Working on these fixes I have stumbled upon this PR #400 which had no tests, I have added some (thinking about another WIP PR that touches constant/instantiate too)

@maximlt maximlt marked this pull request as draft July 12, 2023 01:45
@maximlt maximlt marked this pull request as ready for review July 12, 2023 22:10
param/parameterized.py Outdated Show resolved Hide resolved
@maximlt maximlt requested a review from philippjfr July 20, 2023 21:18
@maximlt
Copy link
Member Author

maximlt commented Jul 20, 2023

This is again ready for review @philippjfr

Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes good sense and thanks for all the tests!

@philippjfr philippjfr merged commit 524bf57 into main Jul 21, 2023
10 checks passed
@philippjfr philippjfr deleted the fix_private_namespace branch July 21, 2023 14:31
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 participants