Skip to content

Commit 228b715

Browse files
leandrodamascenaCavalcante Damascenarubenfonseca
authored
feat(general): add support for Python 3.12 (aws-powertools#3304)
Co-authored-by: Cavalcante Damascena <[email protected]> Co-authored-by: Ruben Fonseca <[email protected]>
1 parent 16db46d commit 228b715

32 files changed

+396
-412
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ body:
6363
- "3.9"
6464
- "3.10"
6565
- "3.11"
66+
- "3.12"
6667
validations:
6768
required: true
6869
- type: dropdown

.github/ISSUE_TEMPLATE/static_typing.yml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ body:
3030
- "3.9"
3131
- "3.10"
3232
- "3.11"
33+
- "3.12"
3334
validations:
3435
required: true
3536
- type: input

.github/workflows/publish_v2_layer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
- name: Setup python
108108
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
109109
with:
110-
python-version: "3.11"
110+
python-version: "3.12"
111111
cache: "pip"
112112
- name: Resolve and install project dependencies
113113
# CDK spawns system python when compiling stack

.github/workflows/quality_check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
max-parallel: 4
4646
matrix:
47-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
47+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
4848
env:
4949
PYTHON: "${{ matrix.python-version }}"
5050
permissions:

.github/workflows/quality_check_pydanticv2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
max-parallel: 4
4646
matrix:
47-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
47+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
4848
env:
4949
PYTHON: "${{ matrix.python-version }}"
5050
permissions:

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
- name: Set up Python
134134
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
135135
with:
136-
python-version: "3.11"
136+
python-version: "3.12"
137137
cache: "poetry"
138138
- name: Install dependencies
139139
run: make dev
@@ -171,7 +171,7 @@ jobs:
171171
- name: Set up Python
172172
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
173173
with:
174-
python-version: "3.11"
174+
python-version: "3.12"
175175
cache: "poetry"
176176

177177
- name: Build python package and wheel

.github/workflows/reusable_deploy_v2_layer_stack.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
- name: Setup python
163163
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
164164
with:
165-
python-version: "3.11"
165+
python-version: "3.12"
166166
cache: "pip"
167167
- name: Resolve and install project dependencies
168168
# CDK spawns system python when compiling stack

.github/workflows/reusable_publish_docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Set up Python
5454
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
5555
with:
56-
python-version: "3.11"
56+
python-version: "3.12"
5757
cache: "poetry"
5858
- name: Install dependencies
5959
run: make dev

.github/workflows/run-e2e-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
fail-fast: false # needed so if a version fails, the others will still be able to complete and cleanup
4949
matrix:
50-
version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
50+
version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
5151
if: ${{ github.actor != 'dependabot[bot]' && github.repository == 'aws-powertools/powertools-lambda-python' }}
5252
steps:
5353
- name: "Checkout"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Build](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/quality_check.yml/badge.svg)](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/python_build.yml)
55
[![codecov.io](https://codecov.io/github/aws-powertools/powertools-lambda-python/branch/develop/graphs/badge.svg)](https://app.codecov.io/gh/aws-powertools/powertools-lambda-python)
6-
![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.7|%203.8|%203.9|%203.10|%203.11&color=blue?style=flat-square&logo=python) ![PyPI version](https://badge.fury.io/py/aws-lambda-powertools.svg) ![PyPi monthly downloads](https://img.shields.io/pypi/dm/aws-lambda-powertools) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python/badge)](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python) [![Join our Discord](https://dcbadge.vercel.app/api/server/B8zZKbbyET)](https://discord.gg/B8zZKbbyET)
6+
![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.7|%203.8|%203.9|%203.10|%203.11|%203.12&color=blue?style=flat-square&logo=python) ![PyPI version](https://badge.fury.io/py/aws-lambda-powertools.svg) ![PyPi monthly downloads](https://img.shields.io/pypi/dm/aws-lambda-powertools) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python/badge)](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python) [![Join our Discord](https://dcbadge.vercel.app/api/server/B8zZKbbyET)](https://discord.gg/B8zZKbbyET)
77

88
Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverless [best practices and increase developer velocity](https://docs.powertools.aws.dev/lambda/python/latest/#features).
99

docs/tutorial/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Let's clone our sample project before we add one feature at a time.
2020
Bootstrap directly via SAM CLI:
2121

2222
```shell
23-
sam init --app-template hello-world-powertools-python --name sam-app --package-type Zip --runtime python3.11 --no-tracing
23+
sam init --app-template hello-world-powertools-python --name sam-app --package-type Zip --runtime python3.12 --no-tracing
2424
```
2525

2626
```bash title="Use SAM CLI to initialize the sample project"
27-
sam init --runtime python3.11 --dependency-manager pip --app-template hello-world --name powertools-quickstart
27+
sam init --runtime python3.12 --dependency-manager pip --app-template hello-world --name powertools-quickstart
2828
```
2929

3030
### Project structure

examples/batch_processing/sam/dynamodb_batch_processing.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Globals:
66
Function:
77
Timeout: 5
88
MemorySize: 256
9-
Runtime: python3.11
9+
Runtime: python3.12
1010
Tracing: Active
1111
Environment:
1212
Variables:

examples/batch_processing/sam/kinesis_batch_processing.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Globals:
66
Function:
77
Timeout: 5
88
MemorySize: 256
9-
Runtime: python3.11
9+
Runtime: python3.12
1010
Tracing: Active
1111
Environment:
1212
Variables:

examples/batch_processing/sam/sqs_batch_processing.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Globals:
66
Function:
77
Timeout: 5
88
MemorySize: 256
9-
Runtime: python3.11
9+
Runtime: python3.12
1010
Tracing: Active
1111
Environment:
1212
Variables:

examples/event_handler_lambda_function_url/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description: Hello world event handler Lambda Function URL
55
Globals:
66
Function:
77
Timeout: 5
8-
Runtime: python3.11
8+
Runtime: python3.12
99
Tracing: Active
1010
Environment:
1111
Variables:

examples/event_handler_rest/sam/micro_function_template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Globals:
1919

2020
Function:
2121
Timeout: 5
22-
Runtime: python3.11
22+
Runtime: python3.12
2323

2424
Resources:
2525
# Lambda Function Solely For /users endpoint

examples/event_handler_rest/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Globals:
1818

1919
Function:
2020
Timeout: 5
21-
Runtime: python3.11
21+
Runtime: python3.12
2222
Tracing: Active
2323
Environment:
2424
Variables:

examples/idempotency/templates/sam.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Resources:
1717
HelloWorldFunction:
1818
Type: AWS::Serverless::Function
1919
Properties:
20-
Runtime: python3.11
20+
Runtime: python3.12
2121
Handler: app.py
2222
Policies:
2323
- Statement:

examples/idempotency/templates/terraform.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resource "aws_dynamodb_table" "IdempotencyTable" {
2828
resource "aws_lambda_function" "IdempotencyFunction" {
2929
function_name = "IdempotencyFunction"
3030
role = aws_iam_role.IdempotencyFunctionRole.arn
31-
runtime = "python3.11"
31+
runtime = "python3.12"
3232
handler = "app.lambda_handler"
3333
filename = "lambda.zip"
3434

examples/logger/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description: Powertools for AWS Lambda (Python) version
55
Globals:
66
Function:
77
Timeout: 5
8-
Runtime: python3.11
8+
Runtime: python3.12
99
Tracing: Active
1010
Environment:
1111
Variables:

examples/metrics/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description: Powertools for AWS Lambda (Python) version
55
Globals:
66
Function:
77
Timeout: 5
8-
Runtime: python3.11
8+
Runtime: python3.12
99
Tracing: Active
1010
Environment:
1111
Variables:

examples/metrics_datadog/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description: Powertools for AWS Lambda (Python) version
55
Globals:
66
Function:
77
Timeout: 5
8-
Runtime: python3.11
8+
Runtime: python3.12
99
Tracing: Active
1010
Environment:
1111
Variables:

examples/middleware_factory/sam/combining_powertools_utilities_template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description: Middleware-powertools-utilities example
55
Globals:
66
Function:
77
Timeout: 5
8-
Runtime: python3.9
8+
Runtime: python3.12
99
Tracing: Active
1010
Architectures:
1111
- x86_64

examples/tracer/sam/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description: Powertools for AWS Lambda (Python) version
55
Globals:
66
Function:
77
Timeout: 5
8-
Runtime: python3.11
8+
Runtime: python3.12
99
Tracing: Active
1010
Environment:
1111
Variables:

0 commit comments

Comments
 (0)