Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Nov 27, 2025

Describe your changes

Deprecates the *kwargs support in st.vega_lite_chart. The spec parameter 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.

@snyk-io
Copy link
Contributor

snyk-io bot commented Nov 27, 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
Contributor

github-actions bot commented Nov 27, 2025

✅ PR preview is ready!

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

@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR change:other PR contains other type of change change:breaking PR contains breaking change that affects backwards compatibility impact:users PR changes affect end users labels Nov 27, 2025
@lukasmasuch lukasmasuch marked this pull request as ready for review November 27, 2025 11:46
Copilot AI review requested due to automatic review settings November 27, 2025 11:46
Copy link
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 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 **kwargs are passed to st.vega_lite_chart
  • Added comprehensive unit tests to verify the deprecation warning behavior
  • Fixed incorrect deprecation message in st.image to recommend the width parameter instead of the deprecated use_container_width parameter

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

Copy link
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby left a comment

Choose a reason for hiding this comment

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

LGTM

@lukasmasuch lukasmasuch merged commit ce1b697 into develop Nov 27, 2025
64 of 65 checks passed
@lukasmasuch lukasmasuch deleted the deprecate-kwargs-for-vega-lite branch November 27, 2025 18:11
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 security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants