Skip to content

Re-enable kaleido deprecations #5236

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

Merged
merged 4 commits into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3724,29 +3724,29 @@ def to_image(self, *args, **kwargs):
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed)
- 'eps' (deprecated) (Requires the poppler library to be installed)

If not specified, will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -3755,14 +3755,14 @@ def to_image(self, *args, **kwargs):
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaliedo"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaliedo"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down Expand Up @@ -3818,31 +3818,31 @@ def write_image(self, *args, **kwargs):
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed)
- 'eps' (deprecated) (Requires the poppler library to be installed)

If not specified and `file` is a string then this will default to the
file extension. If not specified and `file` is not a string then this
will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -3851,14 +3851,14 @@ def write_image(self, *args, **kwargs):
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down
54 changes: 25 additions & 29 deletions plotly/io/_kaleido.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from plotly.io._defaults import defaults

ENGINE_SUPPORT_TIMELINE = "September 2025"
ENABLE_KALEIDO_V0_DEPRECATION_WARNINGS = False
ENABLE_KALEIDO_V0_DEPRECATION_WARNINGS = True

PLOTLY_GET_CHROME_ERROR_MSG = """

Expand Down Expand Up @@ -247,29 +247,29 @@ def to_image(
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed and on the PATH)
- 'eps' (deprecated) (Requires the poppler library to be installed and on the PATH)

If not specified, will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -278,14 +278,14 @@ def to_image(
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down Expand Up @@ -433,31 +433,31 @@ def write_image(
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed and on the PATH)
- 'eps' (deprecated) (Requires the poppler library to be installed and on the PATH)

If not specified and `file` is a string then this will default to the
file extension. If not specified and `file` is not a string then this
will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -466,14 +466,14 @@ def write_image(
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down Expand Up @@ -582,8 +582,7 @@ def write_images(
provided to the `fig` argument.
Specify format as a `str` to apply the same format to all exported images.
If not specified, and the corresponding `file` argument has a file extension, then `format` will default to the
file extension. Otherwise, will default to `plotly.io.defaults.default_format`
or `plotly.io.kaleido.scope.default_format`.
file extension. Otherwise, will default to `plotly.io.defaults.default_format`.

width: int, None, or list of (int or None)
The width of the exported image in layout pixels. If the `scale`
Expand All @@ -593,8 +592,7 @@ def write_images(
Use a list to specify widths for each figure or dict in the list
provided to the `fig` argument.
Specify width as an `int` to apply the same width to all exported images.
If not specified, will default to `plotly.io.defaults.default_width`
or `plotly.io.kaleido.scope.default_width`.
If not specified, will default to `plotly.io.defaults.default_width`.

height: int, None, or list of (int or None)
The height of the exported image in layout pixels. If the `scale`
Expand All @@ -604,8 +602,7 @@ def write_images(
Use a list to specify heights for each figure or dict in the list
provided to the `fig` argument.
Specify height as an `int` to apply the same height to all exported images.
If not specified, will default to `plotly.io.defaults.default_height`
or `plotly.io.kaleido.scope.default_height`.
If not specified, will default to `plotly.io.defaults.default_height`.

scale: int, float, None, or list of (int, float, or None)
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -616,8 +613,7 @@ def write_images(
Use a list to specify scale for each figure or dict in the list
provided to the `fig` argument.
Specify scale as an `int` or `float` to apply the same scale to all exported images.
If not specified, will default to `plotly.io.defaults.default_scale`
or `plotly.io.kaleido.scope.default_scale`.
If not specified, will default to `plotly.io.defaults.default_scale`.

validate: bool or list of bool
True if the figure should be validated before being converted to
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies = [

[project.optional-dependencies]
express = ["numpy"]
kaleido = ["kaleido==1.0.0rc15"]
kaleido = ["kaleido>=1.0.0"]
dev_core = [
"pytest",
"requests",
Expand Down
9 changes: 5 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.