Warnings for NaN data in FigureWidget

This code,

import plotly.graph_objs as go
import numpy

f = go.FigureWidget()
f.add_scatter(y=[1, 3, 2, numpy.nan])
f

, produces this big red warning inside Jupyter Lab,

[...]condaenv/lib/python3.10/site-packages/jupyter_client/session.py:718: UserWarning:

Message serialization failed with:
Out of range float values are not JSON compliant
Supporting this message is deprecated in jupyter-client 7, please make sure your message is JSON-compliant

, in Jupyter Lab.

The reason seems to be that a NaN value is being used.

I am using:

jupyterlab                3.4.3
jupyterlab_widgets        1.1.0
plotly                    5.8.2
python                    3.10.5

My environment was created with:

conda create -p condaenv python=3.10 jupyterlab plotly numpy jupyterlab_widgets ipywidgets -c conda-forge

Does there exist a workaround or fix for this?