Skip to content

Remove native bokeh charts support#12964

Merged
lukasmasuch merged 13 commits intodevelopfrom
remove-native-bokeh
Nov 21, 2025
Merged

Remove native bokeh charts support#12964
lukasmasuch merged 13 commits intodevelopfrom
remove-native-bokeh

Conversation

@lukasmasuch
Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch commented Nov 7, 2025

Describe your changes

Removes the native st.bokeh_chart implementation and changes the command to be a no-op call that just shows a message redirecting users to use https://github.com/streamlit/streamlit-bokeh


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Nov 7, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 7, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12964/streamlit-1.51.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-12964.streamlit.app (☁️ Deploy here if not accessible)

@lukasmasuch lukasmasuch added security-assessment-completed change:other PR contains other type of change impact:users PR changes affect end users labels Nov 7, 2025
@lukasmasuch lukasmasuch marked this pull request as ready for review November 7, 2025 00:31
@lukasmasuch lukasmasuch requested a review from a team as a code owner November 7, 2025 00:31
@cursor
Copy link
Copy Markdown

cursor bot commented Nov 7, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 3.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 7, 2025

📉 Significant wheel size change detected

The wheel file size has decreased by 10.33% (threshold: 0.25%)

  • Current PR: 8865.05 KB
  • Latest develop: 9886.13 KB

Please verify this change is expected.

@lukasmasuch lukasmasuch changed the title Remove native bokeh charts implementation Remove native bokeh charts support Nov 7, 2025
@lukasmasuch lukasmasuch added the change:breaking PR contains breaking change that affects backwards compatibility label Nov 7, 2025
@lukasmasuch lukasmasuch marked this pull request as draft November 8, 2025 00:08
@lukasmasuch lukasmasuch changed the title Remove native bokeh charts support [WIP] Remove native bokeh charts support Nov 8, 2025
@sfc-gh-lmasuch sfc-gh-lmasuch marked this pull request as ready for review November 20, 2025 16:55
# size of web assets low, you can modify this threshold if it's really needed
# to add some new features. But make sure that its justified and intended.
TOTAL_ASSET_SIZE_THRESHOLD_MB: Final = 7.5 # noqa: N806
TOTAL_ASSET_SIZE_THRESHOLD_MB: Final = 7.9 # noqa: N806
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not great that this change randomly causes an uptick in the initial bundle size. However, I don't think it is worth delaying this change. We will anyways work on optimizing our assets later this quarter, so this is expected to be resolved in ~1.53 / ~1.54.

@sfc-gh-lmasuch sfc-gh-lmasuch changed the title [WIP] Remove native bokeh charts support Remove native bokeh charts support Nov 20, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the native Bokeh chart support from Streamlit, converting st.bokeh_chart() into a no-op command that displays a deprecation warning directing users to the streamlit-bokeh custom component.

Key changes:

  • Backend: st.bokeh_chart() now only shows a deprecation warning and returns without rendering
  • Frontend: Complete removal of BokehChart component and all Bokeh vendor files
  • Dependencies: Removal of bokeh, numpy<2 requirements and react-debounce-render package
  • Tests: Simplified to only verify deprecation warning is shown

Reviewed Changes

Copilot reviewed 14 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/streamlit/elements/bokeh_chart.py Converted to no-op with deprecation warning
lib/tests/streamlit/elements/bokeh_test.py Removed all functional tests, kept deprecation test only
lib/integration-requirements.txt Removed bokeh and numpy<2 dependencies
mypy.ini Removed bokeh type ignore configuration
frontend/lib/src/components/elements/BokehChart/* Deleted entire BokehChart component
frontend/lib/src/vendor/bokeh/* Deleted all vendored Bokeh files
frontend/lib/package.json Removed react-debounce-render dependency
e2e_playwright/basic_app_test.py Increased asset size threshold from 7.5 to 7.9 MB
NOTICES Removed bokeh and react-debounce-render license notices
Makefile Removed bokeh license append step

Copy link
Copy Markdown
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉


For more current updates, use the |streamlit-bokeh|_ custom
component instead.
This command has been deprecated and removed. Please use the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Might be something for @sfc-gh-dmatthews to look at, but we should ensure that the wording for the docstring and show_deprecation_warning are aligned. One states "Please use the custom component" and the other states "Please use our custom component." Subtle but different language, and it might make sense to choose one or the other for consistency.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use the same wording 👍 Debbie will probably do additional tweaks before the release.

@lukasmasuch
Copy link
Copy Markdown
Collaborator Author

Waiting for #13078 before merging this in.

@lukasmasuch lukasmasuch enabled auto-merge (squash) November 21, 2025 09:51
@lukasmasuch lukasmasuch added the flaky-verify If applied to PR will run flaky test verification workflow label Nov 21, 2025
@lukasmasuch lukasmasuch disabled auto-merge November 21, 2025 13:24
@lukasmasuch lukasmasuch added flaky-verify If applied to PR will run flaky test verification workflow and removed flaky-verify If applied to PR will run flaky test verification workflow labels Nov 21, 2025
@lukasmasuch lukasmasuch enabled auto-merge (squash) November 21, 2025 13:36
@lukasmasuch lukasmasuch removed the flaky-verify If applied to PR will run flaky test verification workflow label Nov 21, 2025
@lukasmasuch lukasmasuch merged commit 6021727 into develop Nov 21, 2025
43 checks passed
@lukasmasuch lukasmasuch deleted the remove-native-bokeh branch November 21, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:breaking PR contains breaking change that affects backwards compatibility change:other PR contains other type of change impact:users PR changes affect end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants