SNOW-3375255: enable Python 3.14 UDF tests#4172
Merged
Merged
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Collaborator
Author
|
I have read the CLA Document and I hereby sign the CLA |
2250060 to
50937a2
Compare
…ogan-enable-314-tests
…ogan-enable-314-tests
…ogan-enable-314-tests
…ogan-enable-314-tests
sfc-gh-bkogan
commented
Apr 16, 2026
sfc-gh-bkogan
commented
Apr 16, 2026
sfc-gh-bkogan
commented
Apr 16, 2026
…ogan-enable-314-tests
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4172 +/- ##
==========================================
+ Coverage 95.16% 95.41% +0.25%
==========================================
Files 171 171
Lines 43788 43801 +13
Branches 7503 7505 +2
==========================================
+ Hits 41672 41794 +122
+ Misses 1294 1227 -67
+ Partials 822 780 -42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The PyPI gaps in UDTF package resolution (SQL Server, Databricks) are independent of the Python version - they apply to any session whose default artifact repository is PyPI, not just Python 3.14+. Update the comment and the SnowparkClientException message to reflect that, and note that on Python <3.14 a PyPI default can still occur via an account/database/schema-level override.
…ogan-enable-314-tests
…ogan-enable-314-tests
…ogan-enable-314-tests
…ogan-enable-314-tests
…ogan-enable-314-tests
sfc-gh-yuwang
approved these changes
Apr 24, 2026
sfc-gh-yuwang
left a comment
Collaborator
There was a problem hiding this comment.
The data source part LGTM
sfc-gh-helmeleegy
approved these changes
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-3375255
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
UDF tests were disabled due to not having an available build in PyPI. Now we do.
Dynamic dbapi package resolution
Replaced the single
UDTF_PACKAGE_MAPwith two maps and a resolver:_ANACONDA_UDTF_PACKAGE_MAP— the original list (usespsycopg2,msodbcsql,databricks-sql-connector)._PYPI_UDTF_PACKAGE_MAP— a PyPI-compatible subset. Postgres usespsycopg2-binary. SQL Server and Databricks are intentionally omitted.resolve_udtf_packages(dbms_type, artifact_repository)picks the right list. On PyPI for SQL Server / Databricks it raisesSnowparkClientExceptionwith a clear message telling the user to switch to Anaconda.In
BaseDriver.udtf_ingestionwe now callsession._get_default_artifact_repository()to get the session's effective default (which also honours account/database/schema overrides viaSYSTEM$GET_DEFAULT_PYTHON_ARTIFACT_REPOSITORY) and resolve the package list accordingly. Result: a 3.14 user automatically gets the PyPI-friendly list, and a <3.14 user who has manually switched to PyPI also gets a working list (or a clear error for SQL Server/Databricks).Tests skipped on Python 3.14
test_sql_server.py— all UDTF-path variants (directly or viapytest.param(..., marks=...)for parametrized mixes).msodbcsqlis not on PyPI at all. The non-UDTF (client-side) variants still run.test_databricks.py—test_udtf_ingestion_databricksandtest_session_init_udtf(the two tests that exercise the UDTF install path).thriftis sdist-only on PyPI and the Anaconda channel lacks a 3.14 build ofdatabricks-sql-connector.