Skip to content

Commit 45a33a5

Browse files
authored
Support Python version 3.11 on the log forwarder (DataDog#722)
* Support Python version 3.11
1 parent 6d717d0 commit 45a33a5

File tree

10 files changed

+18
-14
lines changed

10 files changed

+18
-14
lines changed

.github/workflows/integration_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: ['3.9', '3.10']
12+
python-version: ['3.10', '3.11']
1313
steps:
1414
- name: Checkout source
1515
uses: actions/checkout@v3

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Setup Python
1212
uses: actions/setup-python@v3
1313
with:
14-
python-version: '3.10'
14+
python-version: '3.11'
1515

1616
- name: Install pip
1717
run: |

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
python-version: ['3.9', '3.10']
11+
python-version: ['3.10', '3.11']
1212
steps:
1313
- name: Checkout source
1414
uses: actions/checkout@v3

aws/logs_monitoring/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ If you can't install the Forwarder using the provided CloudFormation template, y
138138

139139
If you encounter issues upgrading to the latest version, check the Troubleshooting section.
140140

141+
### Upgrade an older version to +3.99.0
142+
143+
Since version 3.99.0 the Lambda function has been updated to require **Python 3.11**. If upgrading an older forwarder installation to +3.99.0 or above, ensure the AWS Lambda function is configured to use Python 3.11
144+
141145
### Upgrade an older version to +3.98.0
142146

143147
Since version 3.98.0 the Lambda function has been updated to require **Python 3.10**. If upgrading an older forwarder installation to 3.98.0 or above, ensure the AWS Lambda function is configured to use Python 3.10

aws/logs_monitoring/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
author="Datadog, Inc.",
1313
author_email="dev@datadoghq.com",
1414
classifiers=[
15-
"Programming Language :: Python :: 3.9",
1615
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
1717
],
1818
keywords="datadog aws lambda layer",
19-
python_requires=">=3.9, <3.11",
19+
python_requires=">=3.10, <3.12",
2020
install_requires=[
2121
"datadog-lambda==4.77.0",
2222
"requests-futures==1.0.0",

aws/logs_monitoring/template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ Resources:
478478

479479
MemorySize:
480480
Ref: MemorySize
481-
Runtime: python3.10
481+
Runtime: python3.11
482482
Timeout:
483483
Ref: Timeout
484484
Tags:
@@ -876,7 +876,7 @@ Resources:
876876
Properties:
877877
Description: Copies Datadog Forwarder zip to the destination S3 bucket
878878
Handler: index.handler
879-
Runtime: python3.10
879+
Runtime: python3.11
880880
Timeout: 300
881881
Code:
882882
ZipFile: |

aws/logs_monitoring/tools/build_bundle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ else
2222
VERSION=$1
2323
fi
2424

25-
PYTHON_VERSION="${PYTHON_VERSION:-3.10}"
25+
PYTHON_VERSION="${PYTHON_VERSION:-3.11}"
2626
FORWARDER_PREFIX="aws-dd-forwarder"
2727
FORWARDER_DIR="../.forwarder"
2828

aws/logs_monitoring/tools/integration_tests/cache_test_lambda/serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
service: integration-tests
22
provider:
33
name: aws
4-
runtime: python3.10
4+
runtime: python3.11
55

66
functions:
77
cache_test_lambda:

aws/logs_monitoring/tools/integration_tests/integration_tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
set -e
99

10-
PYTHON_VERSION="python3.10"
11-
PYTHON_IMAGE="python:3.10"
10+
PYTHON_VERSION="python3.11"
11+
PYTHON_IMAGE="python:3.11"
1212
SKIP_FORWARDER_BUILD=false
1313
UPDATE_SNAPSHOTS=false
1414
LOG_LEVEL=info
@@ -80,8 +80,8 @@ do
8080
esac
8181
done
8282

83-
if [ $PYTHON_VERSION != "python3.9" ] && [ $PYTHON_VERSION != "python3.10" ]; then
84-
echo "Must use either Python 3.9 or 3.10"
83+
if [ $PYTHON_VERSION != "python3.10" ] && [ $PYTHON_VERSION != "python3.11" ]; then
84+
echo "Must use either Python 3.10 or 3.11"
8585
exit 1
8686
fi
8787

aws/logs_monitoring/tools/publish_layers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set -e
1313
# Makes sure any subprocesses will be terminated with this process
1414
trap "pkill -P $$; exit 1;" INT
1515

16-
PYTHON_VERSIONS_FOR_AWS_CLI=("python3.10")
16+
PYTHON_VERSIONS_FOR_AWS_CLI=("python3.11")
1717
LAYER_PATHS=(".forwarder/aws-dd-forwarder-${FORWARDER_VERSION}-layer.zip")
1818
AVAILABLE_LAYERS=("Datadog-Forwarder")
1919
AVAILABLE_REGIONS=$(aws ec2 describe-regions | jq -r '.[] | .[] | .RegionName')

0 commit comments

Comments
 (0)