Skip to content

Commit fffc525

Browse files
moralesljaidisido
andauthored
feat: Add Python 3.11 support (#2414)
* Add Python 3.11 to build scripts * Update lambda layer docs * Add Python 3.11 to install docs * Add Python 3.11 version badge * Add Python 3.11 to black as well * Minor - Upgrade to arrow 12 Signed-off-by: Abdel Jaidi <[email protected]> * Minor - layers.rst is automatically created at release Signed-off-by: Abdel Jaidi <[email protected]> --------- Signed-off-by: Abdel Jaidi <[email protected]> Co-authored-by: Abdel Jaidi <[email protected]>
1 parent 5ddd32c commit fffc525

File tree

7 files changed

+24
-5
lines changed

7 files changed

+24
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Easy integration with Athena, Glue, Redshift, Timestream, OpenSearch, Neptune, Q
1212
> An [AWS Professional Service](https://aws.amazon.com/professional-services/) open source initiative | [email protected]
1313
1414
[![Release](https://img.shields.io/badge/3.2.1-brightgreen.svg)](https://pypi.org/project/awswrangler/)
15-
[![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.8%20%7C%203.9%20%7C%203.10-brightgreen.svg)](https://anaconda.org/conda-forge/awswrangler)
15+
[![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-brightgreen.svg)](https://anaconda.org/conda-forge/awswrangler)
1616
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
1717
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
1818

building/build-lambda-layers.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,11 @@ docker run \
3737
--rm \
3838
awswrangler-build-py310 \
3939
build-lambda-layer.sh "${VERSION}-py3.10${ARCH_SUFFIX}" "ninja-build"
40+
41+
# Python 3.11
42+
docker run \
43+
--volume "$DIR_NAME":/aws-sdk-pandas/ \
44+
--workdir /aws-sdk-pandas/building/lambda \
45+
--rm \
46+
awswrangler-build-py311 \
47+
build-lambda-layer.sh "${VERSION}-py3.11${ARCH_SUFFIX}" "ninja-build"

building/lambda/build-docker-images.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,11 @@ docker build \
2727
--build-arg base_image=public.ecr.aws/lambda/python:3.10 \
2828
.
2929

30+
# Python 3.11
31+
docker build \
32+
--pull \
33+
--tag awswrangler-build-py311 \
34+
--build-arg base_image=public.ecr.aws/lambda/python:3.11 \
35+
.
36+
3037
rm -rf pyproject.toml poetry.lock

building/lambda/build-lambda-layer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export LD_LIBRARY_PATH=$(pwd)/dist/lib:$LD_LIBRARY_PATH
1515

1616
git clone \
1717
--depth 1 \
18-
--branch apache-arrow-10.0.0 \
18+
--branch apache-arrow-12.0.0 \
1919
--single-branch \
2020
https://github.com/apache/arrow.git
2121

docs/source/install.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Install
22
=======
33

4-
**AWS SDK for pandas** runs on Python ``3.8``, ``3.9`` and ``3.10``,
4+
**AWS SDK for pandas** runs on Python ``3.8``, ``3.9``, ``3.10`` and ``3.11``,
55
and on several platforms (AWS Lambda, AWS Glue Python Shell, EMR, EC2,
66
on-premises, Amazon SageMaker, local, etc).
77

@@ -119,6 +119,10 @@ This option provides the ability to use semantic versions (i.e. library version)
119119
* - aws-sdk-pandas-layer-py3-10
120120
- arn:aws:serverlessrepo:us-east-1:336392948345:applications/aws-sdk-pandas-layer-py3-10
121121
- Layer for ``Python 3.10.x`` runtimes
122+
* - aws-sdk-pandas-layer-py3-11
123+
- arn:aws:serverlessrepo:us-east-1:336392948345:applications/aws-sdk-pandas-layer-py3-11
124+
- Layer for ``Python 3.11.x`` runtimes
125+
122126

123127
Here is an example of how to create and use the AWS SDK for pandas Lambda layer in your CDK app:
124128

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ build-backend = "poetry.core.masonry.api"
124124

125125
[tool.black]
126126
line-length = 120
127-
target-version = ["py38", "py39", "py310"]
127+
target-version = ["py38", "py39", "py310", "py311"]
128128
extend_exclude = '''
129129
/(
130130
\.eggs

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ commands =
2020
--cov-fail-under={env:COV_FAIL_UNDER} \
2121
--junitxml=test-reports/junit.xml --log-file=test-reports/logs.txt tests/unit
2222

23-
[testenv:py{37,38,39,310}-distributed]
23+
[testenv:py{37,38,39,310,311}-distributed]
2424
passenv =
2525
AWS_PROFILE
2626
AWS_DEFAULT_REGION

0 commit comments

Comments
 (0)