Skip to content

Commit d058ecd

Browse files
moelasmarbriensea
andauthored
Add python3.11. (#52) (#521)
* Add python3.11. * fix the merge * run make format --------- Co-authored-by: Sean O Brien <[email protected]>
1 parent 7d32d6d commit d058ecd

File tree

8 files changed

+24
-8
lines changed

8 files changed

+24
-8
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ jobs:
122122
- "3.8"
123123
- "3.9"
124124
- "3.10"
125+
- "3.11"
125126
npm:
126127
- 8
127128
- 9
@@ -154,6 +155,7 @@ jobs:
154155
- "3.8"
155156
- "3.9"
156157
- "3.10"
158+
- "3.11"
157159
steps:
158160
- uses: actions/checkout@v3
159161
- uses: actions/setup-python@v4
@@ -180,6 +182,7 @@ jobs:
180182
- "3.8"
181183
- "3.9"
182184
- "3.10"
185+
- "3.11"
183186
steps:
184187
- uses: actions/checkout@v3
185188
- uses: actions/setup-python@v4
@@ -209,6 +212,7 @@ jobs:
209212
- "3.8"
210213
- "3.9"
211214
- "3.10"
215+
- "3.11"
212216
steps:
213217
- uses: actions/checkout@v3
214218
- uses: actions/setup-python@v4
@@ -236,6 +240,7 @@ jobs:
236240
- "3.8"
237241
- "3.9"
238242
- "3.10"
243+
- "3.11"
239244
steps:
240245
- uses: actions/checkout@v3
241246
- uses: actions/setup-python@v4
@@ -259,6 +264,7 @@ jobs:
259264
- "3.8"
260265
- "3.9"
261266
- "3.10"
267+
- "3.11"
262268
steps:
263269
- uses: actions/checkout@v3
264270
- uses: actions/setup-python@v4
@@ -282,6 +288,7 @@ jobs:
282288
- "3.8"
283289
- "3.9"
284290
- "3.10"
291+
- "3.11"
285292
steps:
286293
- uses: actions/checkout@v3
287294
- uses: actions/setup-python@v4
@@ -311,6 +318,7 @@ jobs:
311318
- "3.8"
312319
- "3.9"
313320
- "3.10"
321+
- "3.11"
314322
steps:
315323
- uses: actions/checkout@v3
316324
- uses: actions/setup-python@v4

aws_lambda_builders/validator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"python3.8": [ARM64, X86_64],
1919
"python3.9": [ARM64, X86_64],
2020
"python3.10": [ARM64, X86_64],
21+
"python3.11": [ARM64, X86_64],
2122
"ruby2.7": [ARM64, X86_64],
2223
"ruby3.2": [ARM64, X86_64],
2324
"java8": [ARM64, X86_64],

aws_lambda_builders/workflows/python_pip/DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def build_dependencies(artifacts_dir_path,
4949
5050
:type runtime: str
5151
:param runtime: Python version to build dependencies for. This can
52-
either be python3.7, python3.8, python3.9 or python3.10. These are
52+
either be python3.7, python3.8, python3.9, python3.10 or python3.11. These are
5353
currently the only supported values.
5454
5555
:type ui: :class:`lambda_builders.actions.python_pip.utils.UI`

aws_lambda_builders/workflows/python_pip/packager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def get_lambda_abi(runtime):
8585
"python3.8": "cp38",
8686
"python3.9": "cp39",
8787
"python3.10": "cp310",
88+
"python3.11": "cp311",
8889
}
8990

9091
if runtime not in supported:
@@ -99,7 +100,7 @@ def __init__(self, runtime, osutils=None, dependency_builder=None, architecture=
99100
100101
:type runtime: str
101102
:param runtime: Python version to build dependencies for. This can
102-
either be python3.7, python3.8, python3.9 or python3.10. These are currently the
103+
either be python3.7, python3.8, python3.9, python3.10 or python3.11. These are currently the
103104
only supported values.
104105
105106
:type osutils: :class:`lambda_builders.utils.OSUtils`

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def read_version():
6262
"Programming Language :: Python :: 3.8",
6363
"Programming Language :: Python :: 3.9",
6464
"Programming Language :: Python :: 3.10",
65+
"Programming Language :: Python :: 3.11",
6566
"Topic :: Internet",
6667
"Topic :: Software Development :: Build Tools",
6768
"Topic :: Utilities",

tests/integration/workflows/python_pip/test_python_pip.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
logger = logging.getLogger("aws_lambda_builders.workflows.python_pip.workflow")
1919
IS_WINDOWS = platform.system().lower() == "windows"
2020
NOT_ARM = platform.processor() != "aarch64"
21-
ARM_RUNTIMES = {"python3.8", "python3.9", "python3.10"}
21+
ARM_RUNTIMES = {"python3.8", "python3.9", "python3.10", "python3.11"}
2222

2323

2424
@parameterized_class(("experimental_flags",), [([]), ([EXPERIMENTAL_FLAG_BUILD_PERFORMANCE])])
@@ -61,6 +61,7 @@ def setUp(self):
6161
"python3.8": "python3.9",
6262
"python3.9": "python3.7",
6363
"python3.10": "python3.9",
64+
"python3.11": "python3.10",
6465
}
6566

6667
def tearDown(self):
@@ -93,7 +94,7 @@ def test_must_build_python_project(self):
9394
experimental_flags=self.experimental_flags,
9495
)
9596

96-
if self.runtime == "python3.10":
97+
if self.runtime in ("python3.10", "python3.11"):
9798
self.check_architecture_in("numpy-1.23.5.dist-info", ["manylinux2014_x86_64", "manylinux1_x86_64"])
9899
expected_files = self.test_data_files.union({"numpy", "numpy-1.23.5.dist-info", "numpy.libs"})
99100
else:
@@ -120,7 +121,7 @@ def test_must_build_python_project_python3_binary(self):
120121
executable_search_paths=[executable_dir],
121122
)
122123

123-
if self.runtime == "python3.10":
124+
if self.runtime in ("python3.10", "python3.11"):
124125
self.check_architecture_in("numpy-1.23.5.dist-info", ["manylinux2014_x86_64", "manylinux1_x86_64"])
125126
expected_files = self.test_data_files.union({"numpy", "numpy-1.23.5.dist-info", "numpy.libs"})
126127
else:
@@ -165,12 +166,12 @@ def test_must_build_python_project_with_arm_architecture(self):
165166
experimental_flags=self.experimental_flags,
166167
)
167168
expected_files = self.test_data_files.union({"numpy", "numpy.libs", "numpy-1.20.3.dist-info"})
168-
if self.runtime == "python3.10":
169+
if self.runtime in ("python3.10", "python3.11"):
169170
expected_files = self.test_data_files.union({"numpy", "numpy.libs", "numpy-1.23.5.dist-info"})
170171
output_files = set(os.listdir(self.artifacts_dir))
171172
self.assertEqual(expected_files, output_files)
172173

173-
if self.runtime == "python3.10":
174+
if self.runtime in ("python3.10", "python3.11"):
174175
self.check_architecture_in("numpy-1.23.5.dist-info", ["manylinux2014_aarch64"])
175176
else:
176177
self.check_architecture_in("numpy-1.20.3.dist-info", ["manylinux2014_aarch64"])

tests/integration/workflows/python_pip/testdata/requirements-numpy.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ numpy==1.17.4; python_version == '3.6'
33
numpy==1.20.3; python_version == '3.7'
44
numpy==1.20.3; python_version == '3.8'
55
numpy==1.20.3; python_version == '3.9'
6-
numpy==1.23.5; python_version == '3.10'
6+
numpy==1.23.5; python_version == '3.10'
7+
numpy==1.23.5; python_version == '3.11'

tests/unit/workflows/python_pip/test_packager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ def test_get_lambda_abi_python39(self):
101101
def test_get_lambda_abi_python310(self):
102102
assert "cp310" == get_lambda_abi("python3.10")
103103

104+
def test_get_lambda_abi_python311(self):
105+
assert "cp311" == get_lambda_abi("python3.11")
106+
104107

105108
class TestPythonPipDependencyBuilder(object):
106109
def test_can_call_dependency_builder(self, osutils):

0 commit comments

Comments
 (0)