Skip to content

Commit 78fa9ec

Browse files
ran-isenbergRan Isenberg
and
Ran Isenberg
authored
feature: python 3.11 (#695)
--------- Co-authored-by: Ran Isenberg <ran.isenberg@ranthebuilder.cloud>
1 parent 24b65fd commit 78fa9ec

File tree

8 files changed

+31
-57
lines changed

8 files changed

+31
-57
lines changed

.github/workflows/serverless-service.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
2424
- name: Check out repository code
2525
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
26-
- name: Set up Python 3.10
26+
- name: Set up Python 3.11
2727
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
2828
with:
29-
python-version: "3.10"
29+
python-version: "3.11"
3030
- name: Set up Node
3131
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
3232
with:
@@ -92,10 +92,10 @@ jobs:
9292
steps:
9393
- name: Check out repository code
9494
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
95-
- name: Set up Python 3.10
95+
- name: Set up Python 3.11
9696
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
9797
with:
98-
python-version: "3.10"
98+
python-version: "3.11"
9999
- name: Install dependencies
100100
run: |
101101
pip install --upgrade pip poetry

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.10&color=blue?style=flat-square&logo=python)
5+
![PythonSupport](https://img.shields.io/static/v1?label=python&message=3.11&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/my_service/api_construct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _build_common_layer(self) -> PythonLayerVersion:
7676
self,
7777
f'{self.id_}{constants.LAMBDA_LAYER_NAME}',
7878
entry=constants.COMMON_LAYER_BUILD_FOLDER,
79-
compatible_runtimes=[_lambda.Runtime.PYTHON_3_10],
79+
compatible_runtimes=[_lambda.Runtime.PYTHON_3_11],
8080
removal_policy=RemovalPolicy.DESTROY,
8181
)
8282

@@ -85,7 +85,7 @@ def _add_post_lambda_integration(self, api_name: aws_apigateway.Resource, role:
8585
lambda_function = _lambda.Function(
8686
self,
8787
constants.CREATE_LAMBDA,
88-
runtime=_lambda.Runtime.PYTHON_3_10,
88+
runtime=_lambda.Runtime.PYTHON_3_11,
8989
code=_lambda.Code.from_asset(constants.BUILD_FOLDER),
9090
handler='service.handlers.create_order.create_order',
9191
environment={

cdk/my_service/service_stack.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,5 @@ def _add_security_tests(self) -> None:
8080
'id': 'AwsSolutions-COG4',
8181
'reason': 'not using cognito'
8282
},
83-
{
84-
'id': 'AwsSolutions-L1',
85-
'reason': 'https://github.com/aws/aws-cdk/issues/26451'
86-
},
8783
],
8884
)

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.10',
15+
'Programming Language :: Python :: 3.11',
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.10',
23+
python_requires='>=3.11',
2424
install_requires=[],
2525
)

docs/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: AWS Lambda Cookbook Project Getting started
66

77
* **Docker** - install [Docker](https://www.docker.com/){target="_blank"}. Required for the Lambda layer packaging process.
88
* **[AWS CDK](cdk.md)** - Required for synth & deploying the AWS Cloudformation stack.
9-
* Python 3.10
9+
* Python 3.11
1010
* [poetry](https://pypi.org/project/poetry/){target="_blank"} - Make sure to run ``poetry config --local virtualenvs.in-project true`` so all dependencies are installed in the project '.venv' folder.
1111
* For Windows based machines, use the Makefile_windows version (rename to Makefile). Default Makefile is for Mac/Linux.
1212

poetry.lock

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

pyproject.toml

Lines changed: 2 additions & 2 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.10",
11+
"Programming Language :: Python :: 3.11",
1212
]
1313
repository="https://github.com/ran-isenberg/aws-lambda-handler-cookbook"
1414
readme = "README.md"
1515
keywords = ["aws lambda cookbook", "guide to aws lambda", "cdk template", "best practices", "serverless service template"]
1616
license = "MIT-0"
1717

1818
[tool.poetry.dependencies]
19-
python = "^3.10.0"
19+
python = "^3.11.0"
2020
pydantic = {version = "^2.0.3"}
2121
email-validator = {version = "*"}
2222
aws-lambda-powertools = {extras = ["tracer"],version = "^2.20.0"}

0 commit comments

Comments
 (0)