1.53.0 (2026-07-09)
Snowpark Python API Updates
New Features
- Added the
udf_init_oncedecorator insnowflake.snowpark.functionsfor marking functions to be executed once during pre-fork initialization on Snowflake workers, matching the server-side_snowflake.udf_init_onceAPI.
Bug Fixes
- Fixed a bug where stage paths and file format names that contain single quotes were not consistently escaped when generating SQL, which could produce malformed statements. This affects
INFER_SCHEMA(used byDataFrameReader.csv/json/parquet/orc/avro) andCOPY FILES(used byFileOperation.copy_files). - Fixed a bug where single quotes and backslashes in stage/file paths were not correctly escaped when generating
COPY INTO/PUT/GETSQL, which could produce malformed statements. This affectsDataFrame.write.csv/copy_into_locationand the Snowpark-pandasDataFrame.to_csvstage path. - Fixed a bug where column names containing quote characters returned by an external database were not correctly escaped when generating the
SELECTquery forDataFrameReader.dbapi, which could produce malformed SQL. Embedded quote characters in identifiers are now doubled (backticks for Databricks/MySQL, double quotes for Oracle/PostgreSQL/SQL Server). - Fixed a bug where the destination passed to
DataFrameWriter.copy_into_location(andcsv/json/parquet/save) was embedded into the generatedCOPY INTOstatement without quoting, which could produce malformed SQL for locations containing single quotes. The location is now consistently quoted and escaped, and a string that merely starts and ends with a single quote but contains unescaped interior quotes is no longer treated as an already-quoted literal; it is fully escaped so it stays a single SQL string literal. - Fixed a bug where UDF default argument values reconstructed from a source file in
register_from_filewere evaluated witheval(); they are now evaluated only against the documented set of supported default-value types, and unsupported expressions are ignored. - Fixed a bug where
object_name,object_domain, orobject_versionvalues containing single quotes or backslashes insession.lineage.trace()caused incorrect SQL generation. These values are now properly escaped before being embedded in theSYSTEM$DGQLcall. - Fixed a bug where single quotes and backslashes in
comment(create_or_replace_view/ dynamic table /save_as_table), collation specs (Column.collate), VARIANT/OBJECT subfield keys (Column[...]), andDataFrame/Session.flattenpaths were not correctly escaped when generating SQL, which could produce malformed statements. Backslash sequences (e.g.\t,\n) in these values are now applied literally rather than interpreted. - Fixed a bug where string values in the AI functions (
ai_extract,ai_classify,ai_similarity,ai_parse_document,ai_transcribe,ai_complete) configuration andresponse_formatwere not correctly escaped when generating the SQL object literal, which could produce malformed statements when a value contained single quotes or backslashes (for example, an apostrophe in a natural-language question).
Dependency Updates
- Lifted
protobufrestriction for Python 3.14 from==5.29.3to>=5.29.3,<6.34. - Capped
pandasto<3.0.0for the[pandas]install extra, as Snowpark Python pandas-related features may not be fully compatible with pandas 3.0 or later.