Skip to content
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
10 changes: 9 additions & 1 deletion chalice/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,15 @@ def lambda_python_version(self):
return 'python3.6'
elif (major, minor) <= (3, 7):
return 'python3.7'
return 'python3.8'
elif (major, minor) <= (3, 8):
return 'python3.8'
elif (major, minor) <= (3, 9):
return 'python3.9'
elif (major, minor) <= (3, 10):
return 'python3.10'
elif (major, minor) <= (3, 11):
return 'python3.11'
return 'python3.12'

@property
def layers(self):
Expand Down
4 changes: 4 additions & 0 deletions chalice/deploy/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ class BaseLambdaDeploymentPackager(object):
'python3.6': 'cp36m',
'python3.7': 'cp37m',
'python3.8': 'cp38',
'python3.9': 'cp39',
'python3.10': 'cp310',
'python3.11': 'cp311',
'python3.12': 'cp312',
}

def __init__(self, osutils, dependency_builder, ui):
Expand Down
2 changes: 1 addition & 1 deletion chalice/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def _add_domain_name(self, resource, template):
'DomainName': {'Ref': 'ApiGatewayCustomDomain'},
'RestApiId': {'Ref': 'RestAPI'},
'BasePath': domain_name.api_mapping.mount_path,
'Stage': resource.api_gateway_stage,
'Stage': {'Ref': 'RestAPI.Stage'},
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ def test_can_generate_custom_domain_name(self, sample_app):
'Properties': {
'DomainName': {'Ref': 'ApiGatewayCustomDomain'},
'RestApiId': {'Ref': 'RestAPI'},
'Stage': config.api_gateway_stage,
'Stage': {'Ref': 'RestAPI.Stage'},
'BasePath': '(none)',
}
}
Expand Down Expand Up @@ -1680,7 +1680,7 @@ def test_can_generate_domain_for_regional_endpoint(self, sample_app):
'Properties': {
'DomainName': {'Ref': 'ApiGatewayCustomDomain'},
'RestApiId': {'Ref': 'RestAPI'},
'Stage': config.api_gateway_stage,
'Stage': {'Ref': 'RestAPI.Stage'},
'BasePath': '(none)',
}
}
Expand Down