diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1aea07e652..5ab0561213 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -144,6 +144,7 @@ jobs: 3.10 3.11 3.12 + 3.13 ${{ matrix.python }} - uses: actions/setup-go@v5 with: @@ -249,6 +250,7 @@ jobs: 3.10 3.11 3.12 + 3.13 - name: Stop Docker Linux if: ${{ matrix.os == 'ubuntu-latest' }} run: | diff --git a/appveyor-linux-binary.yml b/appveyor-linux-binary.yml index 8aaf71573c..e212fef510 100644 --- a/appveyor-linux-binary.yml +++ b/appveyor-linux-binary.yml @@ -77,7 +77,7 @@ install: - sh: "./aws_cli/bin/python -m pip install awscli" - sh: "PATH=$(echo $PWD'/aws_cli/bin'):$PATH" - - sh: "PATH=$PATH:$HOME/venv3.7/bin:$HOME/venv3.8/bin:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin" + - sh: "PATH=$PATH:$HOME/venv3.7/bin:$HOME/venv3.8/bin:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin:$HOME/venv3.13/bin" # Install pytest - sh: "python3.9 -m venv $HOME/pytest" diff --git a/appveyor-ubuntu.yml b/appveyor-ubuntu.yml index c3e45d4114..d29f841735 100644 --- a/appveyor-ubuntu.yml +++ b/appveyor-ubuntu.yml @@ -75,7 +75,7 @@ install: - sh: "./aws_cli/bin/python -m pip install awscli" - sh: "PATH=$(echo $PWD'/aws_cli/bin'):$PATH" - - sh: "PATH=$PATH:$HOME/venv3.7/bin:$HOME/venv3.8/bin:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin" + - sh: "PATH=$PATH:$HOME/venv3.7/bin:$HOME/venv3.8/bin:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin:$HOME/venv3.13/bin" # update ca-certificates which causes failures with newest golang library - sh: "sudo apt-get install --reinstall ca-certificates" diff --git a/appveyor-windows-al2023.yml b/appveyor-windows-al2023.yml index 1f3dbbb2c4..71b1f96a0b 100644 --- a/appveyor-windows-al2023.yml +++ b/appveyor-windows-al2023.yml @@ -53,7 +53,21 @@ install: # Make sure the temp directory exists for Python to use. - ps: "mkdir -Force C:\\tmp" - - 'set PATH=%PYTHON_HOME%;C:\Ruby33-x64\bin;C:\Ruby32-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64' + - "python --version" + # Temporarily install python3.13 from the embedded zip file. Once AppVeyor installs it in the image, the below code can be removed. + - ps: 'Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.13.0/python-3.13.0-embed-amd64.zip -OutFile python313.zip' + - ps: "Expand-Archive -Path python313.zip -DestinationPath C:\\Python313-x64" + - 'set PATH=%PYTHON_HOME%;C:\Ruby33-x64\bin;C:\Ruby32-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64;C:\Python313-x64;C:\Python313-x64\Scripts;' + - ps: | + $pth_file = "C:\Python313-x64\python313._pth" + (Get-Content -Path $pth_file) -replace '#import site', 'import site' | Set-Content -Path $pth_file + - ps: | + if (!(Test-Path -Path "C:\Python313-x64\Scripts\pip.exe")) { + Invoke-WebRequest -Uri https://bootstrap.pypa.io/get-pip.py -OutFile get-pip.py + & "C:\Python313-x64\python.exe" get-pip.py + } + - "python --version" + - ps: pip --version - "echo %PYTHON_HOME%" - "echo %PATH%" - "python --version" diff --git a/appveyor-windows-binary.yml b/appveyor-windows-binary.yml index ce5ac4b92c..c4258c62e3 100644 --- a/appveyor-windows-binary.yml +++ b/appveyor-windows-binary.yml @@ -67,7 +67,7 @@ install: # Make sure the temp directory exists for Python to use. - ps: "mkdir -Force C:\\tmp" - - 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python38-x64;C:\Python312-x64' + - 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python38-x64;C:\Python312-x64;C:\Python313-x64' - "echo %PYTHON_HOME%" - "echo %PATH%" - "python --version" diff --git a/appveyor-windows.yml b/appveyor-windows.yml index 20b646ef33..6c19f9affa 100644 --- a/appveyor-windows.yml +++ b/appveyor-windows.yml @@ -66,7 +66,7 @@ install: # Make sure the temp directory exists for Python to use. - ps: "mkdir -Force C:\\tmp" - - 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64' + - 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64;C:\Python313-x64' - "echo %PYTHON_HOME%" - "echo %PATH%" - "python --version" diff --git a/samcli/commands/build/command.py b/samcli/commands/build/command.py index e9be0ea91b..262e40034d 100644 --- a/samcli/commands/build/command.py +++ b/samcli/commands/build/command.py @@ -55,7 +55,7 @@ \b Supported Runtimes ------------------ - 1. Python 3.8, 3.9, 3.10, 3.11, 3.12 using PIP\n + 1. Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 using PIP\n 2. Nodejs 20.x, 18.x, 16.x, 14.x, 12.x using NPM\n 3. Ruby 3.2, 3.3 using Bundler\n 4. Java 8, Java 11, Java 17, Java 21 using Gradle and Maven\n diff --git a/samcli/lib/build/workflow_config.py b/samcli/lib/build/workflow_config.py index b5a250e3df..4725aece49 100644 --- a/samcli/lib/build/workflow_config.py +++ b/samcli/lib/build/workflow_config.py @@ -90,6 +90,7 @@ def get_layer_subfolder(build_workflow: str) -> str: "python3.10": "python", "python3.11": "python", "python3.12": "python", + "python3.13": "python", "nodejs4.3": "nodejs", "nodejs6.10": "nodejs", "nodejs8.10": "nodejs", @@ -158,6 +159,7 @@ def get_workflow_config( "python3.10": BasicWorkflowSelector(PYTHON_PIP_CONFIG), "python3.11": BasicWorkflowSelector(PYTHON_PIP_CONFIG), "python3.12": BasicWorkflowSelector(PYTHON_PIP_CONFIG), + "python3.13": BasicWorkflowSelector(PYTHON_PIP_CONFIG), "nodejs16.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG), "nodejs18.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG), "nodejs20.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG), diff --git a/samcli/lib/utils/architecture.py b/samcli/lib/utils/architecture.py index 2bc34ecb8f..9d45cc7290 100644 --- a/samcli/lib/utils/architecture.py +++ b/samcli/lib/utils/architecture.py @@ -23,6 +23,7 @@ "python3.10": [ARM64, X86_64], "python3.11": [ARM64, X86_64], "python3.12": [ARM64, X86_64], + "python3.13": [ARM64, X86_64], "ruby3.2": [ARM64, X86_64], "ruby3.3": [ARM64, X86_64], "java8.al2": [ARM64, X86_64], diff --git a/samcli/local/common/runtime_template.py b/samcli/local/common/runtime_template.py index c57d5008b8..d34adf3c54 100644 --- a/samcli/local/common/runtime_template.py +++ b/samcli/local/common/runtime_template.py @@ -16,7 +16,7 @@ RUNTIME_DEP_TEMPLATE_MAPPING = { "python": [ { - "runtimes": ["python3.12", "python3.11", "python3.10", "python3.9", "python3.8"], + "runtimes": ["python3.13", "python3.12", "python3.11", "python3.10", "python3.9", "python3.8"], "dependency_manager": "pip", "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-python"), "build": True, @@ -117,6 +117,7 @@ def get_local_lambda_images_location(mapping, runtime): "provided.al2", "provided", # python runtimes in descending order + "python3.13", "python3.12", "python3.11", "python3.10", @@ -141,6 +142,7 @@ def get_local_lambda_images_location(mapping, runtime): "nodejs20.x": "amazon/nodejs20.x-base", "nodejs18.x": "amazon/nodejs18.x-base", "nodejs16.x": "amazon/nodejs16.x-base", + "python3.13": "amazon/python3.13-base", "python3.12": "amazon/python3.12-base", "python3.11": "amazon/python3.11-base", "python3.10": "amazon/python3.10-base", @@ -165,6 +167,7 @@ def get_local_lambda_images_location(mapping, runtime): "python3.10": "Python36", "python3.11": "Python36", "python3.12": "Python36", + "python3.13": "Python36", "dotnet6": "dotnet6", "dotnet8": "dotnet6", "go1.x": "Go1", diff --git a/samcli/local/docker/lambda_debug_settings.py b/samcli/local/docker/lambda_debug_settings.py index 7251da1851..4dfc1549d7 100644 --- a/samcli/local/docker/lambda_debug_settings.py +++ b/samcli/local/docker/lambda_debug_settings.py @@ -173,6 +173,10 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime entry + ["/var/lang/bin/python3.12"] + debug_args_list + ["/var/runtime/bootstrap.py"], container_env_vars=_container_env_vars, ), + Runtime.python313.value: lambda: DebugSettings( + entry + ["/var/lang/bin/python3.13"] + debug_args_list + ["/var/runtime/bootstrap.py"], + container_env_vars=_container_env_vars, + ), } try: return entrypoint_mapping[runtime]() diff --git a/samcli/local/docker/lambda_image.py b/samcli/local/docker/lambda_image.py index 47a5d5d6ad..d28111b2e0 100644 --- a/samcli/local/docker/lambda_image.py +++ b/samcli/local/docker/lambda_image.py @@ -43,6 +43,7 @@ class Runtime(Enum): python310 = "python3.10" python311 = "python3.11" python312 = "python3.12" + python313 = "python3.13" ruby32 = "ruby3.2" ruby33 = "ruby3.3" java8al2 = "java8.al2" diff --git a/schema/samcli.json b/schema/samcli.json index 1831618a0a..dc1422cffa 100644 --- a/schema/samcli.json +++ b/schema/samcli.json @@ -23,7 +23,7 @@ "properties": { "parameters": { "title": "Parameters for the init command", - "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.3, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.", + "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.13, python3.12, python3.11, python3.10, ruby3.3, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.13-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.", "type": "object", "properties": { "no_interactive": { @@ -48,7 +48,7 @@ "runtime": { "title": "runtime", "type": "string", - "description": "Lambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.3, ruby3.2", + "description": "Lambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.13, python3.12, python3.11, python3.10, ruby3.3, ruby3.2", "enum": [ "dotnet6", "dotnet8", @@ -66,6 +66,7 @@ "python3.10", "python3.11", "python3.12", + "python3.13", "python3.8", "python3.9", "ruby3.2", @@ -84,7 +85,7 @@ "base_image": { "title": "base_image", "type": "string", - "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base", + "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.13-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base", "enum": [ "amazon/dotnet6-base", "amazon/dotnet8-base", @@ -101,6 +102,7 @@ "amazon/python3.10-base", "amazon/python3.11-base", "amazon/python3.12-base", + "amazon/python3.13-base", "amazon/python3.8-base", "amazon/python3.9-base", "amazon/ruby3.2-base", diff --git a/tests/integration/buildcmd/test_build_cmd.py b/tests/integration/buildcmd/test_build_cmd.py index 5ac4147fe9..3c5f20db28 100644 --- a/tests/integration/buildcmd/test_build_cmd.py +++ b/tests/integration/buildcmd/test_build_cmd.py @@ -135,7 +135,7 @@ class TestSkipBuildingFunctionsWithLocalImageUri(BuildIntegBase): FUNCTION_LOGICAL_ID_IMAGE = "ImageFunction" - @parameterized.expand(["3.8", "3.9", "3.10", "3.11", "3.12"]) + @parameterized.expand(["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]) def test_with_default_requirements(self, runtime): _tag = uuid4().hex image_uri = f"func:{_tag}" diff --git a/tests/integration/buildcmd/test_build_cmd_arm64.py b/tests/integration/buildcmd/test_build_cmd_arm64.py index b1eb8acb7b..203915bfa8 100644 --- a/tests/integration/buildcmd/test_build_cmd_arm64.py +++ b/tests/integration/buildcmd/test_build_cmd_arm64.py @@ -37,11 +37,13 @@ class TestBuildCommand_PythonFunctions_With_Specified_Architecture_arm64(BuildIn ("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"), @@ -54,6 +56,7 @@ def test_with_default_requirements(self, runtime, codeuri, use_container): @parameterized.expand( [ ("python3.12", "Python", "use_container"), + ("python3.13", "Python", "use_container"), ] ) @pytest.mark.al2023 diff --git a/tests/integration/buildcmd/test_build_cmd_python.py b/tests/integration/buildcmd/test_build_cmd_python.py index 14ed540082..d0813ea16c 100644 --- a/tests/integration/buildcmd/test_build_cmd_python.py +++ b/tests/integration/buildcmd/test_build_cmd_python.py @@ -78,8 +78,8 @@ def test_with_default_requirements(self, runtime, dockerfile): @parameterized.expand( [ - *[(runtime, "Dockerfile") for runtime in ["3.12"]], - *[(runtime, "Dockerfile.production") for runtime in ["3.12"]], + *[(runtime, "Dockerfile") for runtime in ["3.12", "3.13"]], + *[(runtime, "Dockerfile.production") for runtime in ["3.12", "3.13"]], ] ) @pytest.mark.al2023 @@ -167,8 +167,8 @@ def test_with_default_requirements(self, runtime, dockerfile, expected): @parameterized.expand( [ - *[(runtime, "feature_phi/Dockerfile", {"phi": "1.62"}) for runtime in ["3.12"]], - *[(runtime, "feature_pi/Dockerfile", {"pi": "3.14"}) for runtime in ["3.12"]], + *[(runtime, "feature_phi/Dockerfile", {"phi": "1.62"}) for runtime in ["3.12", "3.13"]], + *[(runtime, "feature_pi/Dockerfile", {"pi": "3.14"}) for runtime in ["3.12", "3.13"]], ] ) @pytest.mark.al2023 @@ -307,6 +307,8 @@ def test_with_default_requirements(self): [ ("python3.12", "Python"), ("python3.12", "PythonPEP600"), + ("python3.13", "Python"), + ("python3.13", "PythonPEP600"), ], ) @pytest.mark.al2023 @@ -362,6 +364,7 @@ def test_with_default_requirements(self, runtime): @parameterized.expand( [ ("python3.12",), + ("python3.13",), ] ) @pytest.mark.al2023 @@ -489,6 +492,9 @@ def test_with_default_requirements(self, runtime, codeuri, use_container, archit ("python3.12", "Python", False, "x86_64"), ("python3.12", "PythonPEP600", False, "x86_64"), ("python3.12", "Python", "use_container", "x86_64"), + ("python3.13", "Python", False, "x86_64"), + ("python3.13", "PythonPEP600", False, "x86_64"), + ("python3.13", "Python", "use_container", "x86_64"), ] ) @pytest.mark.al2023 diff --git a/tests/integration/testdata/buildcmd/Python/requirements.txt b/tests/integration/testdata/buildcmd/Python/requirements.txt index 830e1c4b89..a14e9494b3 100644 --- a/tests/integration/testdata/buildcmd/Python/requirements.txt +++ b/tests/integration/testdata/buildcmd/Python/requirements.txt @@ -2,9 +2,7 @@ # NOTE: Fixing to <1.20.3 as numpy1.20.3 started to use a new wheel naming convention (PEP 600) numpy<1.20.3; python_version <= '3.9' -numpy==1.23.5; python_version == '3.10' -numpy==1.23.5; python_version == '3.11' -numpy==1.26.1; python_version == '3.12' +numpy==2.1.3; python_version >= '3.10' # `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container. # Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29 # cryptography~=2.4 diff --git a/tests/integration/testdata/buildcmd/PythonImage/requirements.txt b/tests/integration/testdata/buildcmd/PythonImage/requirements.txt index d5d7b17f51..3457c916b5 100644 --- a/tests/integration/testdata/buildcmd/PythonImage/requirements.txt +++ b/tests/integration/testdata/buildcmd/PythonImage/requirements.txt @@ -2,7 +2,7 @@ # NOTE: Fixing to <1.20.3 as numpy1.20.3 started to use a new wheel naming convention (PEP 600) numpy<1.20.3; python_version < '3.10' -numpy==1.26.4; python_version >= '3.10' +numpy==2.1.3; python_version >= '3.10' # `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container. # Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29 # cryptography~=2.4 diff --git a/tests/integration/testdata/buildcmd/PythonImagesWithSharedCode/requirements.txt b/tests/integration/testdata/buildcmd/PythonImagesWithSharedCode/requirements.txt index d5d7b17f51..3457c916b5 100644 --- a/tests/integration/testdata/buildcmd/PythonImagesWithSharedCode/requirements.txt +++ b/tests/integration/testdata/buildcmd/PythonImagesWithSharedCode/requirements.txt @@ -2,7 +2,7 @@ # NOTE: Fixing to <1.20.3 as numpy1.20.3 started to use a new wheel naming convention (PEP 600) numpy<1.20.3; python_version < '3.10' -numpy==1.26.4; python_version >= '3.10' +numpy==2.1.3; python_version >= '3.10' # `cryptography` has a dependency on `pycparser` which, for some reason doesn't build inside a Docker container. # Turning this off until we resolve this issue: https://github.com/awslabs/aws-lambda-builders/issues/29 # cryptography~=2.4 diff --git a/tests/integration/testdata/buildcmd/PythonPEP600/requirements.txt b/tests/integration/testdata/buildcmd/PythonPEP600/requirements.txt index af06dbb85c..4e7c155791 100644 --- a/tests/integration/testdata/buildcmd/PythonPEP600/requirements.txt +++ b/tests/integration/testdata/buildcmd/PythonPEP600/requirements.txt @@ -2,8 +2,6 @@ # these dependency versions use PEP600 numpy==1.20.3; python_version <= '3.9' -numpy==1.23.5; python_version == '3.10' -numpy==1.23.5; python_version == '3.11' -numpy==1.26.1; python_version == '3.12' -greenlet==3.0.1 -sqlalchemy==2.0.23 +numpy==2.1.3; python_version >= '3.10' +greenlet==3.1.1 +sqlalchemy==2.0.36 diff --git a/tests/unit/commands/init/test_cli.py b/tests/unit/commands/init/test_cli.py index 2c1dd94301..8be3d92e10 100644 --- a/tests/unit/commands/init/test_cli.py +++ b/tests/unit/commands/init/test_cli.py @@ -2008,7 +2008,7 @@ def test_init_cli_generate_default_hello_world_app( request_mock.side_effect = requests.Timeout() init_options_from_manifest_mock.return_value = [ { - "directory": "python3.12/cookiecutter-aws-sam-hello-python", + "directory": "python3.13/cookiecutter-aws-sam-hello-python", "displayName": "Hello World Example", "dependencyManager": "pip", "appTemplate": "hello-world", @@ -2028,10 +2028,10 @@ def test_init_cli_generate_default_hello_world_app( get_preprocessed_manifest_mock.return_value = { "Hello World Example": { - "python3.12": { + "python3.13": { "Zip": [ { - "directory": "python3.12/cookiecutter-aws-sam-hello-python3.12", + "directory": "python3.13/cookiecutter-aws-sam-hello-python3.12", "displayName": "Hello World Example", "dependencyManager": "pip", "appTemplate": "hello-world", @@ -2077,12 +2077,12 @@ def test_init_cli_generate_default_hello_world_app( generate_project_patch.assert_called_once_with( ANY, ZIP, - "python3.12", + "python3.13", "pip", ".", "test-project", True, - {"project_name": "test-project", "runtime": "python3.12", "architectures": {"value": ["x86_64"]}}, + {"project_name": "test-project", "runtime": "python3.13", "architectures": {"value": ["x86_64"]}}, False, False, False, diff --git a/tests/unit/lib/build_module/test_workflow_config.py b/tests/unit/lib/build_module/test_workflow_config.py index 10b9fe0765..7fd866c55d 100644 --- a/tests/unit/lib/build_module/test_workflow_config.py +++ b/tests/unit/lib/build_module/test_workflow_config.py @@ -16,7 +16,9 @@ def setUp(self): self.project_dir = "" EventTracker.clear_trackers() - @parameterized.expand([("python3.8",), ("python3.9",), ("python3.10",), ("python3.11",), ("python3.12",)]) + @parameterized.expand( + [("python3.8",), ("python3.9",), ("python3.10",), ("python3.11",), ("python3.12",), ("python3.13",)] + ) def test_must_work_for_python(self, runtime): result = get_workflow_config(runtime, self.code_dir, self.project_dir) self.assertEqual(result.language, "python") diff --git a/tests/unit/local/docker/test_lambda_container.py b/tests/unit/local/docker/test_lambda_container.py index 0b0841999c..25355c6be4 100644 --- a/tests/unit/local/docker/test_lambda_container.py +++ b/tests/unit/local/docker/test_lambda_container.py @@ -25,6 +25,7 @@ Runtime.python310.value, Runtime.python311.value, Runtime.python312.value, + Runtime.python313.value, Runtime.dotnet6.value, Runtime.dotnet8.value, ] diff --git a/tests/unit/local/docker/test_lambda_debug_settings.py b/tests/unit/local/docker/test_lambda_debug_settings.py index 21e85ef129..ea9e692124 100644 --- a/tests/unit/local/docker/test_lambda_debug_settings.py +++ b/tests/unit/local/docker/test_lambda_debug_settings.py @@ -21,6 +21,7 @@ Runtime.python310, Runtime.python311, Runtime.python312, + Runtime.python313, ]