From 2275bc77668611d2b0b5b032b5bceef168e56759 Mon Sep 17 00:00:00 2001 From: MoMo Date: Sat, 21 Feb 2026 00:14:07 +0200 Subject: [PATCH] Fix spurious engine deprecation warning in write_image write_image() defaulted engine='auto' and passed it to to_image(), which treats any non-None engine value as explicitly user-specified and emits a deprecation warning. By defaulting to None (matching to_image's expected interface), the warning only appears when the user actually passes an engine argument. Fixes #5512 --- plotly/io/_kaleido.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/io/_kaleido.py b/plotly/io/_kaleido.py index 29fa845d762..d0bb0eec438 100644 --- a/plotly/io/_kaleido.py +++ b/plotly/io/_kaleido.py @@ -429,7 +429,7 @@ def write_image( height: Union[int, None] = None, validate: bool = True, # Deprecated - engine: Union[str, None] = "auto", + engine: Union[str, None] = None, ): """ Convert a figure to a static image and write it to a file or writeable