Skip to content

Commit 6d07589

Browse files
feat(runtime): add Python 3.13 support (#5527)
* Initial commit for Python 3.13 * Initial commit for Python 3.13 * Initial commit for Python 3.13 * Make mypy happy * Constructor initial changes * Constructor initial changes * Docker folder * More changes * More changes * More changes * Merging from develop * CDK 2.167.0 * Should not run CDK tests with all python version * Should not run CDK tests with all python version - Python 3.12
1 parent b14ebdd commit 6d07589

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+670
-468
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ body:
6363
- "3.10"
6464
- "3.11"
6565
- "3.12"
66+
- "3.13"
6667
validations:
6768
required: true
6869
- type: dropdown

.github/ISSUE_TEMPLATE/static_typing.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ body:
3030
- "3.10"
3131
- "3.11"
3232
- "3.12"
33+
- "3.13"
3334
validations:
3435
required: true
3536
- type: input

.github/workflows/layer_govcloud.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
- AWSLambdaPowertoolsPythonV3-python310
5050
- AWSLambdaPowertoolsPythonV3-python311
5151
- AWSLambdaPowertoolsPythonV3-python312
52+
- AWSLambdaPowertoolsPythonV3-python313
5253
arch:
5354
- arm64
5455
- x86_64
@@ -94,6 +95,7 @@ jobs:
9495
- AWSLambdaPowertoolsPythonV3-python310
9596
- AWSLambdaPowertoolsPythonV3-python311
9697
- AWSLambdaPowertoolsPythonV3-python312
98+
- AWSLambdaPowertoolsPythonV3-python313
9799
arch:
98100
- arm64
99101
- x86_64
@@ -110,7 +112,7 @@ jobs:
110112
- name: Verify Layer Signature
111113
run: |
112114
SHA=$(jq -r '.Content.CodeSha256' '${{ matrix.layer }}_${{ matrix.arch }}.json')
113-
test "$(openssl dgst -sha256 -binary ${{ matrix.layer }}_${{ matrix.arch }}.zip | openssl enc -base64)" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
115+
test "$(openssl dgst -sha256 -binary ${{ matrix.layer }}_${{ matrix.arch }}.zip | openssl enc -base64)" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
114116
- name: Configure AWS Credentials
115117
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
116118
with:
@@ -144,7 +146,7 @@ jobs:
144146
run: |
145147
REMOTE_SHA=$(aws --region us-gov-east-1 lambda get-layer-version-by-arn --arn 'arn:aws-us-gov:lambda:us-gov-east-1:${{ secrets.AWS_ACCOUNT_ID }}:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ env.LAYER_VERSION }}' --query 'Content.CodeSha256' --output text)
146148
SHA=$(jq -r '.Content.CodeSha256' '${{ matrix.layer }}_${{ matrix.arch }}.json')
147-
test "$REMOTE_SHA" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
149+
test "$REMOTE_SHA" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
148150
aws --region us-gov-east-1 lambda get-layer-version-by-arn --arn 'arn:aws-us-gov:lambda:us-gov-east-1:${{ secrets.AWS_ACCOUNT_ID }}:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ env.LAYER_VERSION }}' --output table
149151
150152
copy_west:
@@ -162,6 +164,7 @@ jobs:
162164
- AWSLambdaPowertoolsPythonV3-python310
163165
- AWSLambdaPowertoolsPythonV3-python311
164166
- AWSLambdaPowertoolsPythonV3-python312
167+
- AWSLambdaPowertoolsPythonV3-python313
165168
arch:
166169
- arm64
167170
- x86_64
@@ -179,7 +182,7 @@ jobs:
179182
- name: Verify Layer Signature
180183
run: |
181184
SHA=$(jq -r '.Content.CodeSha256' '${{ matrix.layer }}_${{ matrix.arch }}.json')
182-
test "$(openssl dgst -sha256 -binary ${{ matrix.layer }}_${{ matrix.arch }}.zip | openssl enc -base64)" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
185+
test "$(openssl dgst -sha256 -binary ${{ matrix.layer }}_${{ matrix.arch }}.zip | openssl enc -base64)" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
183186
- name: Configure AWS Credentials
184187
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
185188
with:
@@ -213,5 +216,5 @@ jobs:
213216
run: |
214217
REMOTE_SHA=$(aws --region us-gov-west-1 lambda get-layer-version-by-arn --arn 'arn:aws-us-gov:lambda:us-gov-west-1:${{ secrets.AWS_ACCOUNT_ID }}:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ env.LAYER_VERSION }}' --query 'Content.CodeSha256' --output text)
215218
SHA=$(jq -r '.Content.CodeSha256' '${{ matrix.layer }}_${{ matrix.arch }}.json')
216-
test "$REMOTE_SHA" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
217-
aws --region us-gov-west-1 lambda get-layer-version-by-arn --arn 'arn:aws-us-gov:lambda:us-gov-west-1:${{ secrets.AWS_ACCOUNT_ID }}:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ env.LAYER_VERSION }}' --output table
219+
test "$REMOTE_SHA" == "$SHA" && echo "SHA OK: ${SHA}" || exit 1
220+
aws --region us-gov-west-1 lambda get-layer-version-by-arn --arn 'arn:aws-us-gov:lambda:us-gov-west-1:${{ secrets.AWS_ACCOUNT_ID }}:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ env.LAYER_VERSION }}' --output table

.github/workflows/layer_govcloud_verify.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- AWSLambdaPowertoolsPythonV3-python310
3434
- AWSLambdaPowertoolsPythonV3-python311
3535
- AWSLambdaPowertoolsPythonV3-python312
36+
- AWSLambdaPowertoolsPythonV3-python313
3637
arch:
3738
- arm64
3839
- x86_64
@@ -63,6 +64,7 @@ jobs:
6364
- AWSLambdaPowertoolsPythonV3-python310
6465
- AWSLambdaPowertoolsPythonV3-python311
6566
- AWSLambdaPowertoolsPythonV3-python312
67+
- AWSLambdaPowertoolsPythonV3-python313
6668
arch:
6769
- arm64
6870
- x86_64
@@ -94,6 +96,7 @@ jobs:
9496
- AWSLambdaPowertoolsPythonV3-python310
9597
- AWSLambdaPowertoolsPythonV3-python311
9698
- AWSLambdaPowertoolsPythonV3-python312
99+
- AWSLambdaPowertoolsPythonV3-python313
97100
arch:
98101
- arm64
99102
- x86_64

.github/workflows/publish_v3_layer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
strategy:
8686
max-parallel: 5
8787
matrix:
88-
python-version: ["3.8","3.9","3.10","3.11","3.12"]
88+
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
8989
defaults:
9090
run:
9191
working-directory: ./layer_v3

.github/workflows/quality_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
strategy:
4747
max-parallel: 4
4848
matrix:
49-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
49+
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
5050
env:
5151
PYTHON: "${{ matrix.python-version }}"
5252
permissions:

.github/workflows/quality_code_cdk_constructor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ name: Code quality - CDK constructor
1515
on:
1616
pull_request:
1717
paths:
18-
- "layer/layer_constructors/**"
18+
- "layer_v3/layer_constructors/**"
1919
branches:
2020
- develop
2121
push:
2222
paths:
23-
- "layer/layer_constructors/**"
23+
- "layer_v3/layer_constructors/**"
2424
branches:
2525
- develop
2626

2727
permissions:
2828
contents: read
2929

3030
jobs:
31-
quality_check:
31+
quality_check_cdk:
3232
runs-on: ubuntu-latest
3333
strategy:
3434
max-parallel: 4
3535
matrix:
36-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
36+
python-version: ["3.12"]
3737
env:
3838
PYTHON: "${{ matrix.python-version }}"
3939
permissions:

.github/workflows/reusable_deploy_v3_layer_stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
"eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3",
7979
"il-central-1", "me-central-1", "me-south-1", "sa-east-1", "us-east-1",
8080
"us-east-2", "us-west-1", "us-west-2"]
81-
python-version: ["3.8","3.9","3.10","3.11","3.12"]
81+
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
8282
include:
8383
- region: "af-south-1"
8484
has_arm64_support: "true"

.github/workflows/reusable_deploy_v3_sar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy V3 SAR
44
#
55
# 1. This workflow starts after the layer artifact is produced on `publish_v3_layer`
66
# 2. We use the same layer artifact to ensure the SAR app is consistent with the published Lambda Layer
7-
# 3. We publish the SAR for 3.8 to 3.12 Python runtime and both x86_64 and arm64 (see `matrix` section)
7+
# 3. We publish the SAR for 3.8 to 3.13 Python runtime and both x86_64 and arm64 (see `matrix` section)
88
# 4. We use `sam package` and `sam publish` to publish the SAR app
99
# 5. We remove the previous Canary stack (if present) and deploy a new one to test the SAR App. We retain the Canary in the account for debugging purposes
1010
# 6. Finally the published SAR app is made public on the PROD environment
@@ -72,7 +72,7 @@ jobs:
7272
strategy:
7373
matrix:
7474
architecture: ["x86_64", "arm64"]
75-
python-version: ["3.8","3.9","3.10","3.11","3.12"]
75+
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
7676
steps:
7777
- name: checkout
7878
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

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

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

0 commit comments

Comments
 (0)