fix: add stacklevel to deprecation warnings

This commit is contained in:
Lance Edgar 2024-07-02 09:05:51 -05:00
parent db67630363
commit aab4dec27e

View file

@ -853,7 +853,7 @@ class BatchMasterView(MasterView):
if isinstance(field.widget, forms.widgets.PlainSelectWidget):
warnings.warn("PlainSelectWidget is deprecated; "
"please use deform.widget.SelectWidget instead",
DeprecationWarning)
DeprecationWarning, stacklevel=2)
field.widget = dfwidget.SelectWidget(values=field.widget.values)
if not schema: