From b893a7e79f8d571d3352f7780ee532508c656f5a Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Thu, 23 Jan 2025 11:13:10 -0800 Subject: [PATCH] fix(git_action): remove python3.7 & 3.8 (#7844) * remove python3.7 & 3.8 * remove python3.8 or replace with python3.11 --- .github/workflows/build.yml | 8 +------- tests/integration/buildcmd/test_build_cmd.py | 10 +++++----- tests/integration/buildcmd/test_build_cmd_arm64.py | 3 --- tests/integration/buildcmd/test_build_cmd_python.py | 6 ------ tests/integration/buildcmd/test_build_samconfig.py | 2 +- 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a239c2e67f..6c19ddae91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,6 @@ jobs: - ubuntu-latest - windows-latest python: - - "3.8" - "3.9" - "3.11" steps: @@ -111,8 +110,8 @@ jobs: - ubuntu-latest - windows-latest python: - - "3.8" - "3.9" + - "3.11" # folders that is commented below requires credentials, no need to spare time to run them tests_config: - "-n 2 --reruns 3 tests/integration/buildcmd" @@ -138,8 +137,6 @@ jobs: with: # set last version as the one in matrix to make it default python-version: | - 3.7 - 3.8 3.9 3.10 3.11 @@ -213,7 +210,6 @@ jobs: - ubuntu-latest - windows-latest python: - - "3.8" - "3.9" - "3.11" steps: @@ -244,8 +240,6 @@ jobs: with: # These are the versions of Python that correspond to the supported Lambda runtimes python-version: | - 3.7 - 3.8 3.9 3.10 3.11 diff --git a/tests/integration/buildcmd/test_build_cmd.py b/tests/integration/buildcmd/test_build_cmd.py index 3c5f20db28..b9c60586c1 100644 --- a/tests/integration/buildcmd/test_build_cmd.py +++ b/tests/integration/buildcmd/test_build_cmd.py @@ -595,7 +595,7 @@ def test_build_layer_with_architecture_not_compatible(self, build_method, use_co # Build should still succeed self.assertEqual(command_result.process.returncode, 0) - @parameterized.expand([("python3.8", False), ("python3.8", "use_container")]) + @parameterized.expand([("python3.11", False), ("python3.11", "use_container")]) def test_build_arch_no_compatible_arch(self, runtime, use_container): # BuildArchitecture is present, but CompatibleArchitectures section is missing if use_container and (SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD): @@ -621,7 +621,7 @@ def test_build_arch_no_compatible_arch(self, runtime, use_container): # Build should still succeed self.assertEqual(command_result.process.returncode, 0) - @parameterized.expand([("python3.8", False), ("python3.8", "use_container")]) + @parameterized.expand([("python3.11", False), ("python3.11", "use_container")]) def test_compatible_arch_no_build_arch(self, runtime, use_container): # CompatibleArchitectures is present, but BuildArchitecture section is missing if use_container and (SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD): @@ -691,7 +691,7 @@ def test_function_build_succeeds_with_referenced_layer(self, use_container): if use_container and (SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD): self.skipTest(SKIP_DOCKER_MESSAGE) - overrides = {"Runtime": "python3.8", "CodeUri": "Python"} + overrides = {"Runtime": "python3.11", "CodeUri": "Python"} cmdlist = self.get_command_list( use_container=use_container, parameter_overrides=overrides, function_identifier="FunctionTwo" @@ -1123,7 +1123,7 @@ def test_no_cached_override_build(self): "FunctionCodeUri": "Python", "Function1Handler": "main.first_function_handler", "Function2Handler": "main.second_function_handler", - "FunctionRuntime": "python3.8", + "FunctionRuntime": "python3.11", } config_file = str(Path(self.test_data_path).joinpath("samconfig_no_cached.toml")) cmdlist = self.get_command_list(parameter_overrides=overrides, cached=True) @@ -1161,7 +1161,7 @@ def test_cached_build_with_env_vars(self): "FunctionCodeUri": "Python", "Function1Handler": "main.first_function_handler", "Function2Handler": "main.second_function_handler", - "FunctionRuntime": "python3.8", + "FunctionRuntime": "python3.11", } cmdlist = self.get_command_list( use_container=True, parameter_overrides=overrides, cached=True, container_env_var="FOO=BAR" diff --git a/tests/integration/buildcmd/test_build_cmd_arm64.py b/tests/integration/buildcmd/test_build_cmd_arm64.py index 9ee36a34d2..5e3aefd4f8 100644 --- a/tests/integration/buildcmd/test_build_cmd_arm64.py +++ b/tests/integration/buildcmd/test_build_cmd_arm64.py @@ -32,19 +32,16 @@ class TestBuildCommand_PythonFunctions_With_Specified_Architecture_arm64(BuildIn @parameterized.expand( [ - ("python3.8", "Python", False), ("python3.9", "Python", False), ("python3.10", "Python", False), ("python3.11", "Python", False), ("python3.12", "Python", False), ("python3.13", "Python", False), - ("python3.8", "PythonPEP600", False), ("python3.9", "PythonPEP600", False), ("python3.10", "PythonPEP600", False), ("python3.11", "PythonPEP600", False), ("python3.12", "PythonPEP600", False), ("python3.13", "PythonPEP600", False), - ("python3.8", "Python", "use_container"), ("python3.9", "Python", "use_container"), ("python3.10", "Python", "use_container"), ("python3.11", "Python", "use_container"), diff --git a/tests/integration/buildcmd/test_build_cmd_python.py b/tests/integration/buildcmd/test_build_cmd_python.py index d0813ea16c..2e7f11dbb6 100644 --- a/tests/integration/buildcmd/test_build_cmd_python.py +++ b/tests/integration/buildcmd/test_build_cmd_python.py @@ -261,11 +261,9 @@ def test_windows_dockerfile_present_sub_dir(self, dockerfile, expected): "codeuri", ), [ - ("python3.8", "Python"), ("python3.9", "Python"), ("python3.10", "Python"), ("python3.11", "Python"), - ("python3.8", "PythonPEP600"), ("python3.9", "PythonPEP600"), ("python3.10", "PythonPEP600"), ("python3.11", "PythonPEP600"), @@ -345,7 +343,6 @@ class TestBuildCommand_PythonFunctions_WithDocker(BuildIntegPythonBase): @parameterized.expand( [ - ("python3.8",), ("python3.9",), ("python3.10",), ("python3.11",), @@ -467,15 +464,12 @@ class TestBuildCommand_PythonFunctions_With_Specified_Architecture(BuildIntegPyt @parameterized.expand( [ - ("python3.8", "Python", False, "x86_64"), ("python3.9", "Python", False, "x86_64"), ("python3.10", "Python", False, "x86_64"), ("python3.11", "Python", False, "x86_64"), - ("python3.8", "PythonPEP600", False, "x86_64"), ("python3.9", "PythonPEP600", False, "x86_64"), ("python3.10", "PythonPEP600", False, "x86_64"), ("python3.11", "PythonPEP600", False, "x86_64"), - ("python3.8", "Python", "use_container", "x86_64"), ("python3.9", "Python", "use_container", "x86_64"), ("python3.10", "Python", "use_container", "x86_64"), ("python3.11", "Python", "use_container", "x86_64"), diff --git a/tests/integration/buildcmd/test_build_samconfig.py b/tests/integration/buildcmd/test_build_samconfig.py index 933e62b183..b43044e3d0 100644 --- a/tests/integration/buildcmd/test_build_samconfig.py +++ b/tests/integration/buildcmd/test_build_samconfig.py @@ -57,7 +57,7 @@ def test_samconfig_fails_properly_with_incorrect_extension(self): ] ) def test_samconfig_parameters_are_overridden(self, extension): - overrides = {"Runtime": "python3.8"} + overrides = {"Runtime": "python3.11"} overridden_build_dir = f"override_{extension}" cmdlist = self.get_command_list(