diff --git a/chalice/config.py b/chalice/config.py index 35151ddc1..818c6ad37 100644 --- a/chalice/config.py +++ b/chalice/config.py @@ -150,11 +150,11 @@ def lambda_python_version(self) -> str: major, minor = sys.version_info[0], sys.version_info[1] if (major, minor) < (3, 8): return 'python3.8' - elif (major, minor) <= (3, 11): + elif (major, minor) <= (3, 12): # Otherwise we use your current version of python if Lambda # supports it. return 'python%s.%s' % (major, minor) - return 'python3.12' + return 'python3.13' @property def log_retention_in_days(self) -> int: diff --git a/chalice/deploy/packager.py b/chalice/deploy/packager.py index b379b4f44..c8de9ddae 100644 --- a/chalice/deploy/packager.py +++ b/chalice/deploy/packager.py @@ -81,6 +81,7 @@ class BaseLambdaDeploymentPackager(object): 'python3.10': 'cp310', 'python3.11': 'cp311', 'python3.12': 'cp312', + 'python3.13': 'cp313', } def __init__( @@ -499,6 +500,7 @@ class DependencyBuilder(object): 'cp310': (2, 26), 'cp311': (2, 26), 'cp312': (2, 26), + 'cp313': (2, 26), } # Fallback version if we're on an unknown python version # not in _RUNTIME_GLIBC. diff --git a/setup.py b/setup.py index 55faaaf7c..5e456d0ef 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,9 @@ def recursive_include(relative_dir): 'pyyaml>=5.3.1,<7.0.0', 'inquirer>=3.0.0,<4.0.0', 'wheel', - 'setuptools' + 'setuptools', + 'legacy-cgi==2.6.2', + ] setup( diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index d8e729b24..bf1e591cf 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -381,8 +381,10 @@ def test_can_load_python_version(): expected_runtime = 'python3.10' elif minor <= 11: expected_runtime = 'python3.11' - else: + elif minor <= 12: expected_runtime = 'python3.12' + else: + expected_runtime = 'python3.13' assert c.lambda_python_version == expected_runtime