Skip to content

Commit c144904

Browse files
ran-isenbergRan Isenberg
andauthored
feature: add python 3.12 support (#21)
Co-authored-by: Ran Isenberg <ran.isenberg@ranthebuilder.cloud>
1 parent bb4744a commit c144904

File tree

8 files changed

+21
-17
lines changed

8 files changed

+21
-17
lines changed

{{cookiecutter.repo_name}}/.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:

{{cookiecutter.repo_name}}/.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:

{{cookiecutter.repo_name}}/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='{{cookiecutter.author}}',
1919
author_email='{{cookiecutter.email}}',
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
)

{{cookiecutter.repo_name}}/cdk/{{cookiecutter.service_name}}/api_construct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _build_common_layer(self) -> PythonLayerVersion:
7979
self,
8080
f'{self.id_}{constants.LAMBDA_LAYER_NAME}',
8181
entry=constants.COMMON_LAYER_BUILD_FOLDER,
82-
compatible_runtimes=[_lambda.Runtime.PYTHON_3_11],
82+
compatible_runtimes=[_lambda.Runtime.PYTHON_3_12],
8383
removal_policy=RemovalPolicy.DESTROY,
8484
)
8585

@@ -88,7 +88,7 @@ def _add_post_lambda_integration(self, api_name: aws_apigateway.Resource, role:
8888
lambda_function = _lambda.Function(
8989
self,
9090
constants.CREATE_LAMBDA,
91-
runtime=_lambda.Runtime.PYTHON_3_11,
91+
runtime=_lambda.Runtime.PYTHON_3_12,
9292
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
9393
handler='{{cookiecutter.service_name}}.handlers.handle_create_order.lambda_handler',
9494
environment={

{{cookiecutter.repo_name}}/cdk/{{cookiecutter.service_name}}/service_stack.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,9 @@ def _add_security_tests(self) -> None:
7676
'id': 'AwsSolutions-COG4',
7777
'reason': 'not using cognito'
7878
},
79+
{
80+
'id': 'AwsSolutions-L1',
81+
'reason': 'False positive'
82+
},
7983
],
8084
)

{{cookiecutter.repo_name}}/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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.102.0"
3+
"aws-cdk": "2.115.0"
44
}
55
}

{{cookiecutter.repo_name}}/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ classifiers=[
88
"Intended Audience :: Developers",
99
"License :: OSI Approved :: MIT License",
1010
"Natural Language :: English",
11-
"Programming Language :: Python :: 3.11",
11+
"Programming Language :: Python :: 3.12",
1212
]
1313
repository="https://github.com/replaceme/{{cookiecutter.repo_name}}"
1414
readme = "README.md"
1515
keywords = ["{{cookiecutter.service_name}}"]
1616
license = "MIT-0"
1717

1818
[tool.poetry.dependencies]
19-
python = "^3.11.0"
19+
python = "^3.12.0"
2020
pydantic = {version = "^2.0.3"}
2121
email-validator = {version = "*"}
2222
aws-lambda-powertools = {extras = ["tracer"],version = "^2.20.0"}
@@ -57,7 +57,7 @@ types-requests = "*"
5757
toml = "*"
5858

5959
[tool.isort]
60-
py_version = 311
60+
py_version = 312
6161
multi_line_output = 3
6262
include_trailing_comma = true
6363
force_grid_wrap = 0

0 commit comments

Comments
 (0)