diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 94490acdbc..30d5707e5f 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -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. diff --git a/src/snowflake/cli/_plugins/snowpark/common.py b/src/snowflake/cli/_plugins/snowpark/common.py index 8f2d17be62..4cbdbbdcbc 100644 --- a/src/snowflake/cli/_plugins/snowpark/common.py +++ b/src/snowflake/cli/_plugins/snowpark/common.py @@ -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] diff --git a/tests/snowpark/test_common.py b/tests/snowpark/test_common.py index 138c1656cb..0fc6177557 100644 --- a/tests/snowpark/test_common.py +++ b/tests/snowpark/test_common.py @@ -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) diff --git a/tests/snowpark/test_function.py b/tests/snowpark/test_function.py index b62f498e92..a22d333826 100644 --- a/tests/snowpark/test_function.py +++ b/tests/snowpark/test_function.py @@ -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=() diff --git a/tests/snowpark/test_procedure.py b/tests/snowpark/test_procedure.py index 3222828e3e..6c419f0438 100644 --- a/tests/snowpark/test_procedure.py +++ b/tests/snowpark/test_procedure.py @@ -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=() @@ -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=() diff --git a/tests/test_data/test_data.py b/tests/test_data/test_data.py index 968f8aa8e3..5736f348a9 100644 --- a/tests/test_data/test_data.py +++ b/tests/test_data/test_data.py @@ -136,7 +136,7 @@ }, { "property": "runtime_version", - "value": "3.8" + "value": "3.10" }, { "property": "packages", @@ -144,6 +144,6 @@ }, { "property": "installed_packages", - "value": "['python==3.8.17']" + "value": "['python==3.10.17']" } ]""" diff --git a/tests/testing_utils/fixtures.py b/tests/testing_utils/fixtures.py index a9c77a8fb2..157d022499 100644 --- a/tests/testing_utils/fixtures.py +++ b/tests/testing_utils/fixtures.py @@ -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']"), ], diff --git a/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_procs.sql b/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_procs.sql index d4212d2939..af2696251d 100644 --- a/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_procs.sql +++ b/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_procs.sql @@ -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'); diff --git a/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_udf.sql b/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_udf.sql index fa466f3b1f..44b60ec7bc 100644 --- a/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_udf.sql +++ b/tests_e2e/test_data/nativeapp/root_files/setup_scripts/user_gen_udf.sql @@ -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');