-
Notifications
You must be signed in to change notification settings - Fork 4k
Deprecate kwargs support for st.vega_lite_chart
#13141
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
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!
|
There was a problem hiding this 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 pull request deprecates the variable keyword arguments (**kwargs) support in st.vega_lite_chart, requiring users to use the spec parameter instead for passing Vega-Lite configuration options. Additionally, it fixes an incorrect deprecation message in st.image.
Key Changes
- Added deprecation warning when
**kwargsare passed tost.vega_lite_chart - Added comprehensive unit tests to verify the deprecation warning behavior
- Fixed incorrect deprecation message in
st.imageto recommend thewidthparameter instead of the deprecateduse_container_widthparameter
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/streamlit/elements/vega_charts.py | Added deprecation warning logic that triggers when kwargs are passed to vega_lite_chart |
| lib/tests/streamlit/elements/vega_charts_test.py | Added two new tests: one to verify deprecation warning is shown when kwargs are used, another to verify no warning when kwargs are not used |
| lib/streamlit/elements/image.py | Fixed deprecation message to recommend width parameter instead of the also-deprecated use_container_width parameter |
| e2e_playwright/st_image_test.py | Updated e2e test assertion to match the corrected deprecation message |
sfc-gh-lwilby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Describe your changes
Deprecates the *kwargs support in
st.vega_lite_chart. Thespecparameter should be used instead for passing spec configuration.Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.