From 4220d14c747c3c548b895bbaa45ee3278843359e Mon Sep 17 00:00:00 2001 From: Matthew Davis Date: Tue, 1 Jul 2025 08:20:50 +0200 Subject: [PATCH 1/2] Add support for Python 3.13 --- CICD/template.yaml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CICD/template.yaml b/CICD/template.yaml index d1f0da0..88f75bf 100644 --- a/CICD/template.yaml +++ b/CICD/template.yaml @@ -350,7 +350,7 @@ Resources: PackageType: Zip ReservedConcurrentExecutions: 1 Role: !GetAtt LambdaRole.Arn - Runtime: python3.11 + Runtime: python3.12 Timeout: 60 VpcConfig: SecurityGroupIds: diff --git a/setup.py b/setup.py index ad4e215..5be5651 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,11 @@ 'Operating System :: OS Independent', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ], keywords=['python', 'AWS', 'Amazon', 'Lambda', 'multiprocessing', 'pool', 'concurrency'], packages=find_packages(), From f3fe677514aeb9fcae7ee7d530703fb110cd36e0 Mon Sep 17 00:00:00 2001 From: Matthew Davis Date: Tue, 1 Jul 2025 08:22:50 +0200 Subject: [PATCH 2/2] Remove unit test for Python 3.8 --- .github/workflows/unit.yml | 2 +- lambda_multiprocessing/test_main.py | 12 +----------- setup.py | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 4533bb3..4d4849c 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] runs-on: ubuntu-latest steps: diff --git a/lambda_multiprocessing/test_main.py b/lambda_multiprocessing/test_main.py index 50df0b9..0e9f17d 100644 --- a/lambda_multiprocessing/test_main.py +++ b/lambda_multiprocessing/test_main.py @@ -6,22 +6,12 @@ from pathlib import Path import os import sys - +from functools import cache import boto3 from moto import mock_aws from lambda_multiprocessing.timeout import TimeoutManager, TestTimeoutException -if sys.version_info < (3, 9): - # functools.cache was added in 3.9 - # define an empty decorator that doesn't do anything - # (our usage of the cache isn't essential) - def cache(func): - return func -else: - # Import the cache function from functools for Python 3.9 and above - from functools import cache - # add an overhead for duration when asserting the duration of child processes # if other processes are hogging CPU, make this bigger delta = 0.1 diff --git a/setup.py b/setup.py index 5be5651..2516c9c 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='lambda_multiprocessing', - version='1.0', + version='1.1', description='drop-in replacement for multiprocessing.Pool in AWS Lambda functions (without /dev/shm shared memory)', long_description=long_description, long_description_content_type="text/markdown",