Skip to content

Commit

Permalink
feature: add python 3.12 support (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: Ran Isenberg <[email protected]>
  • Loading branch information
ran-isenberg and Ran Isenberg authored Dec 15, 2023
1 parent bb4744a commit c144904
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ permissions:
contents: read

env:
NODE_VERSION: "18"
PYTHON_VERSION: "3.11"
NODE_VERSION: "20"
PYTHON_VERSION: "3.12"
AWS_REGION: "us-east-1"

on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ permissions:
contents: read

env:
NODE_VERSION: "18"
PYTHON_VERSION: "3.11"
NODE_VERSION: "20"
PYTHON_VERSION: "3.12"
AWS_REGION: "us-east-1"

on:
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.repo_name}}/cdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
classifiers=[
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
url='https://github.com/ran-isenberg/aws-lambda-handler-cookbook',
author='{{cookiecutter.author}}',
author_email='{{cookiecutter.email}}',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
package_data={'': ['*.json']},
include_package_data=True,
python_requires='>=3.11',
python_requires='>=3.12',
install_requires=[],
)
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _build_common_layer(self) -> PythonLayerVersion:
self,
f'{self.id_}{constants.LAMBDA_LAYER_NAME}',
entry=constants.COMMON_LAYER_BUILD_FOLDER,
compatible_runtimes=[_lambda.Runtime.PYTHON_3_11],
compatible_runtimes=[_lambda.Runtime.PYTHON_3_12],
removal_policy=RemovalPolicy.DESTROY,
)

Expand All @@ -88,7 +88,7 @@ def _add_post_lambda_integration(self, api_name: aws_apigateway.Resource, role:
lambda_function = _lambda.Function(
self,
constants.CREATE_LAMBDA,
runtime=_lambda.Runtime.PYTHON_3_11,
runtime=_lambda.Runtime.PYTHON_3_12,
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
handler='{{cookiecutter.service_name}}.handlers.handle_create_order.lambda_handler',
environment={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ def _add_security_tests(self) -> None:
'id': 'AwsSolutions-COG4',
'reason': 'not using cognito'
},
{
'id': 'AwsSolutions-L1',
'reason': 'False positive'
},
],
)
10 changes: 5 additions & 5 deletions {{cookiecutter.repo_name}}/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion {{cookiecutter.repo_name}}/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"aws-cdk": "2.102.0"
"aws-cdk": "2.115.0"
}
}
6 changes: 3 additions & 3 deletions {{cookiecutter.repo_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
repository="https://github.com/replaceme/{{cookiecutter.repo_name}}"
readme = "README.md"
keywords = ["{{cookiecutter.service_name}}"]
license = "MIT-0"

[tool.poetry.dependencies]
python = "^3.11.0"
python = "^3.12.0"
pydantic = {version = "^2.0.3"}
email-validator = {version = "*"}
aws-lambda-powertools = {extras = ["tracer"],version = "^2.20.0"}
Expand Down Expand Up @@ -57,7 +57,7 @@ types-requests = "*"
toml = "*"

[tool.isort]
py_version = 311
py_version = 312
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
Expand Down

0 comments on commit c144904

Please sign in to comment.