Skip to content

Commit

Permalink
Bump Snowpark default Python version to 3.10 (#1420)
Browse files Browse the repository at this point in the history
* Bump Snowpark default Python version to 3.10

* fixup! Bump Snowpark default Python version to 3.10
  • Loading branch information
sfc-gh-turbaszek authored Aug 8, 2024
1 parent be4b03e commit 3e27d74
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* `snow object stage` commands are removed in favour of `snow stage`.
* `snow snowpark init` and `snow streamlit init` commands are removed in favor of `snow init` command.
* Removed deprecated flags from `snow snowpark` commands.
* Default Python version for Snowpark functions and procedures was bumped to 3.10 from 3.8.

## Deprecations
* Added deprecation warning for `native_app.package.scripts` in project definition file.
Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/cli/_plugins/snowpark/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from snowflake.cli.api.sql_execution import SqlExecutionMixin
from snowflake.connector.cursor import SnowflakeCursor

DEFAULT_RUNTIME = "3.8"
DEFAULT_RUNTIME = "3.10"
FunctionOrProcedure = Union[FunctionSchema, ProcedureSchema]


Expand Down
2 changes: 1 addition & 1 deletion tests/snowpark/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_check_if_replace_is_required(mock_procedure_description, arguments, exp
"external_access_integrations": [],
"imports": [],
"stage_artifact_file": "@FOO.BAR.BAZ/my_snowpark_project/app.zip",
"runtime_ver": "3.8",
"runtime_ver": "3.10",
"execute_as_caller": True,
}
replace_arguments.update(arguments)
Expand Down
2 changes: 1 addition & 1 deletion tests/snowpark/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_deploy_function_with_external_access(
copy grants
returns string
language python
runtime_version=3.8
runtime_version=3.10
imports=('@MockDatabase.MockSchema.dev_deployment/my_snowpark_project/app.zip')
handler='app.func1_handler'
packages=()
Expand Down
4 changes: 2 additions & 2 deletions tests/snowpark/test_procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_deploy_procedure(
copy grants
returns string
language python
runtime_version=3.8
runtime_version=3.10
imports=('@MockDatabase.MockSchema.dev_deployment/my_snowpark_project/app.zip')
handler='hello'
packages=()
Expand Down Expand Up @@ -154,7 +154,7 @@ def test_deploy_procedure_with_external_access(
copy grants
returns string
language python
runtime_version=3.8
runtime_version=3.10
imports=('@MockDatabase.MockSchema.dev_deployment/my_snowpark_project/app.zip')
handler='app.hello'
packages=()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_data/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@
},
{
"property": "runtime_version",
"value": "3.8"
"value": "3.10"
},
{
"property": "packages",
"value": "["snowpark-connector-python"]"
},
{
"property": "installed_packages",
"value": "['python==3.8.17']"
"value": "['python==3.10.17']"
}
]"""
2 changes: 1 addition & 1 deletion tests/testing_utils/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def mock_procedure_description(mock_cursor):
("body", None),
("imports", "[@FOO.BAR.BAZ/my_snowpark_project/app.zip]"),
("handler", "app.hello_procedure"),
("runtime_version", "3.8"),
("runtime_version", "3.10"),
("packages", "['snowflake-snowpark-python','pytest<9.0.0,>=7.0.0']"),
("installed_packages", "['_libgcc_mutex==0.1']"),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
create or replace procedure ext_code_schema.py_echo_proc(STR string)
RETURNS STRING
LANGUAGE PYTHON
RUNTIME_VERSION='3.8'
RUNTIME_VERSION='3.10'
PACKAGES = ('snowflake-snowpark-python')
HANDLER = 'echo.echo_proc'
IMPORTS = ('/user_gen/echo.py');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
create or replace function ext_code_schema.py_echo_fn(STR string)
RETURNS STRING
LANGUAGE PYTHON
RUNTIME_VERSION=3.8
RUNTIME_VERSION=3.10
PACKAGES=('snowflake-snowpark-python')
HANDLER='echo.echo_fn'
IMPORTS=('/user_gen/echo.py');
Expand Down

0 comments on commit 3e27d74

Please sign in to comment.