Skip to content

Fix plotly >= 7.0 compatibility (drop removed show_link option) - #3180

Closed
webzuweb wants to merge 1 commit into
catboost:masterfrom
webzuweb:fix/plotly-7-compat
Closed

webzuweb wants to merge 1 commit into
catboost:masterfrom
webzuweb:fix/plotly-7-compat

Conversation

@webzuweb

@webzuweb webzuweb commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #3160.

Problem

plotly 7.0 removed the show_link option from plotly.offline.plot, so save_plot_file (in plot_helpers.py) raised a TypeError when rendering a chart. The dependency pin plotly (<7.0) also prevented installing catboost alongside plotly 7.x.

Change

  • Removed the now-invalid show_link=False argument from the plotly.offline.plot call in plot_helpers.py. output_type='div' and include_plotlyjs=False are preserved (verified against plotly 7.0.0).
  • Relaxed the dependency pin from plotly (<7.0) to plotly (<8.0) since the code is now compatible with 7.x.

Test

Added ut/small/test_plot_helpers.py — test_save_plot_file_plotly_7_compat asserts save_plot_file calls plotly.offline.plot without show_link, with output_type='div' and include_plotlyjs=False. Skips if plotly is not installed.

plotly 7.0 removed the show_link option from plotly.offline.plot, so save_plot_file crashed with a TypeError when rendering a chart. Stop passing show_link and relax the plotly dependency pin from <7.0 to <8.0 now that the code is compatible.
@robot-magpie

robot-magpie Bot commented Sep 15, 2026

Copy link
Copy Markdown

@andrey-khropov has imported your pull request. If you are a Yandex employee, you can view this diff.

@robot-magpie

robot-magpie Bot commented Sep 16, 2026

Copy link
Copy Markdown

✅ This pull request is being closed because it has been successfully merged into our internal monorepository.
Your changes will be pushed to this repository soon. Thank you for your contribution!

@robot-magpie robot-magpie Bot closed this Sep 16, 2026
robot-piglet pushed a commit that referenced this pull request Sep 16, 2026
Fixes #3160.

## Problem

plotly 7.0 removed the `show_link` option from `plotly.offline.plot`, so `save_plot_file` (in `plot_helpers.py`) raised a `TypeError` when rendering a chart. The dependency pin `plotly (<7.0)` also prevented installing catboost alongside plotly 7.x.

## Change

- Removed the now-invalid `show_link=False` argument from the `plotly.offline.plot` call in `plot_helpers.py`. `output_type='div'` and `include_plotlyjs=False` are preserved (verified against plotly 7.0.0).
- Relaxed the dependency pin from `plotly (<7.0)` to `plotly (<8.0)` since the code is now compatible with 7.x.

## Test

Added `ut/small/test_plot_helpers.py` — `test_save_plot_file_plotly_7_compat` asserts `save_plot_file` calls `plotly.offline.plot` without `show_link`, with `output_type='div'` and `include_plotlyjs=False`. Skips if plotly is not installed.

---

Pull Request resolved: #3180
commit_hash:5bd5fdddf616b4e09738ca674322925772905cba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compatibility with plotly >= 7.x

2 participants