Skip to content

Commit 3282b53

Browse files
ran-isenbergRan Isenberg
and
Ran Isenberg
authored
feature: upgrade python 3.12 (#779)
--------- Co-authored-by: Ran Isenberg <ran.isenberg@ranthebuilder.cloud>
1 parent 9d6f35e commit 3282b53

File tree

12 files changed

+146
-187
lines changed

12 files changed

+146
-187
lines changed

.github/workflows/main-serverless-service.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ permissions:
66
contents: read
77

88
env:
9-
NODE_VERSION: "18"
10-
PYTHON_VERSION: "3.11"
9+
NODE_VERSION: "20"
10+
PYTHON_VERSION: "3.12"
1111
AWS_REGION: "us-east-1"
1212

1313
on:

.github/workflows/pr-serverless-service.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ permissions:
66
contents: read
77

88
env:
9-
NODE_VERSION: "18"
10-
PYTHON_VERSION: "3.11"
9+
NODE_VERSION: "20"
10+
PYTHON_VERSION: "3.12"
1111
AWS_REGION: "us-east-1"
1212

1313
on:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
exclude: "^(?!helpers/)"
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
2828
# Ruff version.
29-
rev: v0.1.7
29+
rev: v0.1.8
3030
hooks:
3131
# Run the Ruff linter.
3232
- id: ruff

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# AWS Lambda Handler Cookbook (Python)
33

44
[![license](https://img.shields.io/github/license/ran-isenberg/aws-lambda-handler-cookbook)](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/master/LICENSE)
5-
![PythonSupport](https://img.shields.io/static/v1?label=python&message=3.11&color=blue?style=flat-square&logo=python)
5+
![PythonSupport](https://img.shields.io/static/v1?label=python&message=3.12&color=blue?style=flat-square&logo=python)
66
[![codecov](https://codecov.io/gh/ran-isenberg/aws-lambda-handler-cookbook/branch/main/graph/badge.svg?token=P2K7K4KICF)](https://codecov.io/gh/ran-isenberg/aws-lambda-handler-cookbook)
77
![version](https://img.shields.io/github/v/release/ran-isenberg/aws-lambda-handler-cookbook)
88
![github-star-badge](https://img.shields.io/github/stars/ran-isenberg/aws-lambda-handler-cookbook.svg?style=social)

cdk/service/api_construct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _build_common_layer(self) -> PythonLayerVersion:
8787
self,
8888
f'{self.id_}{constants.LAMBDA_LAYER_NAME}',
8989
entry=constants.COMMON_LAYER_BUILD_FOLDER,
90-
compatible_runtimes=[_lambda.Runtime.PYTHON_3_11],
90+
compatible_runtimes=[_lambda.Runtime.PYTHON_3_12],
9191
removal_policy=RemovalPolicy.DESTROY,
9292
)
9393

@@ -97,7 +97,7 @@ def _add_post_lambda_integration(
9797
lambda_function = _lambda.Function(
9898
self,
9999
constants.CREATE_LAMBDA,
100-
runtime=_lambda.Runtime.PYTHON_3_11,
100+
runtime=_lambda.Runtime.PYTHON_3_12,
101101
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
102102
handler='service.handlers.handle_create_order.lambda_handler',
103103
environment={

cdk/service/service_stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ def _add_security_tests(self) -> None:
5252
{'id': 'AwsSolutions-APIG6', 'reason': 'not mandatory in a sample template'},
5353
{'id': 'AwsSolutions-APIG4', 'reason': 'authorization not mandatory in a sample template'},
5454
{'id': 'AwsSolutions-COG4', 'reason': 'not using cognito'},
55-
{'id': 'AwsSolutions-L1', 'reason': 'Python 3.12 not out yet'},
55+
{'id': 'AwsSolutions-L1', 'reason': 'False positive'},
5656
],
5757
)

cdk/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
classifiers=[
1313
'Intended Audience :: Developers',
1414
'Topic :: Software Development :: Build Tools',
15-
'Programming Language :: Python :: 3.11',
15+
'Programming Language :: Python :: 3.12',
1616
],
1717
url='https://github.com/ran-isenberg/aws-lambda-handler-cookbook',
1818
author='Ran Isenberg',
1919
author_email='ran.isenberg@ranthebuilder.cloud',
2020
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
2121
package_data={'': ['*.json']},
2222
include_package_data=True,
23-
python_requires='>=3.11',
23+
python_requires='>=3.12',
2424
install_requires=[],
2525
)

docs/examples/best_practices/dynamic_configuration/lambda_cdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _build_lambda_function(self, role: iam.Role, db: dynamodb.Table, appconfig_a
3535
return _lambda.Function(
3636
self,
3737
'ServicePost',
38-
runtime=_lambda.Runtime.PYTHON_3_11,
38+
runtime=_lambda.Runtime.PYTHON_3_12,
3939
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
4040
handler='service.handlers.create_order.create_order',
4141
environment={

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"dependencies": {
3-
"aws-cdk": "2.114.1"
3+
"aws-cdk": "2.115.0"
44
}
55
}

0 commit comments

Comments
 (0)