Skip to content

add support for python3.13 #2133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chalice/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions chalice/deploy/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class BaseLambdaDeploymentPackager(object):
'python3.10': 'cp310',
'python3.11': 'cp311',
'python3.12': 'cp312',
'python3.13': 'cp313',
}

def __init__(
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down