Avoid setting batched
before the class is initialized
#5814
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@hoxbro feel free to reject this PR since it's not a fix per say.
What used to happen is showed in the example below, where the
batched
Parameter ofGenericOverlayPlot
was set (self.batched = batched
) beforeParameterized.__init__
was called. Setting a Parameter value before a Parameterized class is initialized (at the Param sense) has been supported somehow in Param for a long time. holoviz/param#766 broke that support temporarily, while holoviz/param#790 is an attempt at restoring it before Param 2.0 is released. Breaking that support temporarily allowed me to spot that thisbatched
case was the only occurrence of a Parameter value being set early across a few code bases (Panel, Lumen, HoloViews). Because of that, and because it feels to me like an anti-pattern, I was tempted to open this PR to avoid this,