Skip to content

Add deprecation warning to SnowparkConnection#14125

Merged
lukasmasuch merged 1 commit intodevelopfrom
lukasmasuch/snowpark-deprecation
Feb 26, 2026
Merged

Add deprecation warning to SnowparkConnection#14125
lukasmasuch merged 1 commit intodevelopfrom
lukasmasuch/snowpark-deprecation

Conversation

@lukasmasuch
Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch commented Feb 25, 2026

Describe your changes

Deprecates SnowparkConnection in favor of SnowflakeConnection:

  • Adds show_deprecation_warning call in __init__ with show_once=True
  • Adds .. warning:: directive to the class docstring pointing users to SnowflakeConnection
  • Adds unit test to verify the deprecation warning is shown

Context: #14094 (comment)

Testing Plan

  • Unit test (SnowparkConnectionDeprecationTest)

Add deprecation warning and docstring notice to SnowparkConnection,
directing users to use SnowflakeConnection instead.
Copilot AI review requested due to automatic review settings February 25, 2026 09:58
@lukasmasuch lukasmasuch added the type:enhancement Requests for feature enhancements or new features label Feb 25, 2026
@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Feb 25, 2026

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 Feb 25, 2026

✅ PR preview is ready!

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

@lukasmasuch lukasmasuch added security-assessment-completed change:other PR contains other type of change change:feature PR contains new feature or enhancement implementation impact:users PR changes affect end users and removed type:enhancement Requests for feature enhancements or new features change:feature PR contains new feature or enhancement implementation labels Feb 25, 2026
@lukasmasuch lukasmasuch changed the title [Deprecation] Add deprecation warning to SnowparkConnection Add deprecation warning to SnowparkConnection Feb 25, 2026
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 deprecates SnowparkConnection in favor of SnowflakeConnection, which provides equivalent Snowpark session functionality through its .session() method. The deprecation includes both runtime warnings and documentation updates to guide users to the new API.

Changes:

  • Added deprecation warning to SnowparkConnection.__init__() with show_once=True to prevent spam
  • Updated class docstring with .. warning:: directive pointing users to SnowflakeConnection
  • Added comprehensive unit test to verify the deprecation warning is properly displayed

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/streamlit/connections/snowpark_connection.py Adds show_deprecation_warning() import and call in __init__, plus .. warning:: directive in docstring
lib/tests/streamlit/connections/snowpark_connection_test.py Adds new test class SnowparkConnectionDeprecationTest to verify warning behavior

@lukasmasuch lukasmasuch merged commit 3e10b30 into develop Feb 26, 2026
106 of 108 checks passed
@lukasmasuch lukasmasuch deleted the lukasmasuch/snowpark-deprecation branch February 26, 2026 17:46
@lukasmasuch lukasmasuch added the change:breaking PR contains breaking change that affects backwards compatibility label Feb 26, 2026
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.

3 participants