Remove native bokeh charts support#12964
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
|
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. |
📉 Significant wheel size change detectedThe wheel file size has decreased by 10.33% (threshold: 0.25%)
Please verify this change is expected. |
| # 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
|
|
||
| For more current updates, use the |streamlit-bokeh|_ custom | ||
| component instead. | ||
| This command has been deprecated and removed. Please use the |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Updated to use the same wording 👍 Debbie will probably do additional tweaks before the release.
|
Waiting for #13078 before merging this in. |
Describe your changes
Removes the native
st.bokeh_chartimplementation and changes the command to be a no-op call that just shows a message redirecting users to use https://github.com/streamlit/streamlit-bokehContribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.