Skip to content

Commit e4de9f6

Browse files
chore: drop Python3.9 support
1 parent 4822e9d commit e4de9f6

File tree

34 files changed

+72
-919
lines changed

34 files changed

+72
-919
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ body:
5858
attributes:
5959
label: AWS Lambda function runtime
6060
options:
61-
- "3.9"
6261
- "3.10"
6362
- "3.11"
6463
- "3.12"

.github/ISSUE_TEMPLATE/static_typing.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ body:
2525
attributes:
2626
label: AWS Lambda function runtime
2727
options:
28-
- "3.9"
2928
- "3.10"
3029
- "3.11"
3130
- "3.12"

.github/workflows/publish_v3_layer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy v3 layer to all regions
22

33
# PROCESS
44
#
5-
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for Python3.9-3.14 and x86_64/ARM architectures (uses custom runner as it's CPU heavy)
5+
# 1. Compile Layer using cdk-aws-lambda-powertools-layer CDK construct for Python3.10-3.14 and x86_64/ARM architectures (uses custom runner as it's CPU heavy)
66
# 2. Kick off pipeline for beta, prod, and canary releases
77
# 3. Create PR to update trunk so staged docs also point to the latest Layer ARN, when merged
88
# 4. Builds and publishes docs with latest Layer ARN using given version (generally coming from release)
@@ -102,7 +102,7 @@ jobs:
102102
strategy:
103103
max-parallel: 5
104104
matrix:
105-
python-version: ["3.9","3.10","3.11","3.12","3.13","3.14"]
105+
python-version: ["3.10","3.11","3.12","3.13","3.14"]
106106
defaults:
107107
run:
108108
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: 5
4848
matrix:
49-
python-version: ["3.9","3.10","3.11","3.12","3.13","3.14"]
49+
python-version: ["3.10","3.11","3.12","3.13","3.14"]
5050
env:
5151
PYTHON: "${{ matrix.python-version }}"
5252
permissions:

.github/workflows/reusable_deploy_v3_layer_stack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy CDK Layer v3 stack
33
# PROCESS
44
#
55
# 1. Split what AWS regions support ARM vs regions that Lambda support ARM
6-
# 2. We build the Lambda layer for 3.9 to 3.14 Python runtime and both x86_64 and arm64 (see `matrix` section)
6+
# 2. We build the Lambda layer for 3.10 to 3.14 Python runtime and both x86_64 and arm64 (see `matrix` section)
77
# 3. Deploy previously built layer for each AWS commercial region
88
# 4. Export all published Layers as JSON
99
# 5. Deploy Canaries to every deployed region to test whether Powertools can be imported etc.
@@ -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", "mx-central-1", "sa-east-1", "us-east-1",
8080
"us-east-2", "us-west-1", "us-west-2"]
81-
python-version: ["3.9","3.10","3.11","3.12","3.13","3.14"]
81+
python-version: ["3.10","3.11","3.12","3.13","3.14"]
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.9 to 3.13 Python runtime and both x86_64 and arm64 (see `matrix` section)
7+
# 3. We publish the SAR for 3.10 to 3.14 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.9","3.10","3.11","3.12","3.13","3.14"]
75+
python-version: ["3.10","3.11","3.12","3.13","3.14"]
7676
steps:
7777
- name: checkout
7878
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.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.9", "3.10", "3.11", "3.12","3.13","3.14"]
51+
version: ["3.10", "3.11", "3.12","3.13","3.14"]
5252
if: ${{ github.actor != 'dependabot[bot]' && github.repository == 'aws-powertools/powertools-lambda-python' }}
5353
steps:
5454
- name: "Checkout"

.github/workflows/update_ssm.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,12 @@ jobs:
100100
PACKAGE_VERSION: ${{ inputs.package_version }}
101101
LAYER_VERSION: ${{ inputs.layer_version }}
102102
run: |
103-
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.9/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:$LAYER_VERSION" --type String --overwrite
104103
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.10/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-arm64:$LAYER_VERSION" --type String --overwrite
105104
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.11/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-arm64:$LAYER_VERSION" --type String --overwrite
106105
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.12/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:$LAYER_VERSION" --type String --overwrite
107106
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.13/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:$LAYER_VERSION" --type String --overwrite
108107
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.14/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python314-arm64:$LAYER_VERSION" --type String --overwrite
109108
110-
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.9/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-x86_64:$LAYER_VERSION" --type String --overwrite
111109
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.10/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86_64:$LAYER_VERSION" --type String --overwrite
112110
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.11/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86_64:$LAYER_VERSION" --type String --overwrite
113111
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.12/$PACKAGE_VERSION --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:$LAYER_VERSION" --type String --overwrite
@@ -120,14 +118,12 @@ jobs:
120118
prefix: ${{ inputs.environment == 'beta' && '/aws/service/powertools/beta' || '/aws/service/powertools' }}
121119
LAYER_VERSION: ${{ inputs.layer_version }}
122120
run: |
123-
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.9/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:$LAYER_VERSION" --type String --overwrite
124121
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.10/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-arm64:$LAYER_VERSION" --type String --overwrite
125122
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.11/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-arm64:$LAYER_VERSION" --type String --overwrite
126123
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.12/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:$LAYER_VERSION" --type String --overwrite
127124
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.13/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:$LAYER_VERSION" --type String --overwrite
128125
aws ssm put-parameter --name ${{ env.prefix }}/python/arm64/python3.14/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python314-arm64:$LAYER_VERSION" --type String --overwrite
129126
130-
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.9/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-x86_64:$LAYER_VERSION" --type String --overwrite
131127
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.10/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86_64:$LAYER_VERSION" --type String --overwrite
132128
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.11/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86_64:$LAYER_VERSION" --type String --overwrite
133129
aws ssm put-parameter --name ${{ env.prefix }}/python/x86_64/python3.12/latest --value "arn:aws:lambda:${{ matrix.region }}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:$LAYER_VERSION" --type String --overwrite

README.md

Lines changed: 1 addition & 1 deletion
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.9|%203.10|%203.11|%203.12|%203.13|%203.14&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)
6+
![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.10|%203.11|%203.12|%203.13|%203.14&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)
77
[![Discord](https://img.shields.io/badge/Discord-Join_Community-7289da.svg)](https://discord.gg/B8zZKbbyET)
88

99
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).

aws_lambda_powertools/event_handler/openapi/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def extract_metadata(ann: Any) -> tuple[Any, list[Any]]:
211211
base_type, constraints = extract_metadata(annotation)
212212

213213
# Set the annotation with base type and all constraint metadata
214-
# Use tuple unpacking for Python 3.9+ compatibility
214+
# Use tuple unpacking for Python 3.10+ compatibility
215215
if constraints:
216216
new_field.annotation = Annotated[(base_type, *constraints)]
217217
else:

0 commit comments

Comments
 (0)