-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Use of WidgetBase raises ParamFutureWarning #968
Comments
This is not a bug, this is a param level warning and it's indicating a real potential issue. One could argue that if no default is set on the baseclass then the overriding class should override the default but we can't do anything about that in Panel, so moving to param. |
It's also due to import param
class A(param.Parameterized):
x = param.Parameter()
class B(A):
x = param.String()
print(A.x)
print(A.param.x.allow_None)
print(B.x)
print(B.param.x.allow_None)
They are a couple of tests that capture this (somewhat buggy) behavior: param/tests/testparameterizedobject.py Lines 1294 to 1326 in e54dd51
|
I'm on panel==1.5.0rc2 and param==2.1.1.
I have a custom
CompositeWidget
that I noticed started raising aParamFutureWarning
. After some inspection I can see the problem is is caused by the fact that theWidgetBase.value
is aParameter
while myCustomWidget.value
is aString
.I think this will be cause general problems as
WidgetBase
is now intended to be mixed into all kinds of custom widgets.Reproduce
Workaround
Change
param.String()
toparam.String("")
. Then theParamFutureWarning
will not be raised.The text was updated successfully, but these errors were encountered: