Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:aws/aws-lambda-builders into pip…
Browse files Browse the repository at this point in the history
…_setup_invoke_fix
  • Loading branch information
lucashuy committed Jul 13, 2023
2 parents f088dac + 95f3a4b commit 24653d8
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
npm:
- 8
- 9
Expand Down Expand Up @@ -154,6 +155,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -180,6 +182,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -209,6 +212,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -236,6 +240,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -259,6 +264,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -282,6 +288,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -311,6 +318,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion aws_lambda_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

# Changing version will trigger a new release!
# Please make the version change as the last step of your development.
__version__ = "1.34.0"
__version__ = "1.35.0"
RPC_PROTOCOL_VERSION = "0.3"
1 change: 1 addition & 0 deletions aws_lambda_builders/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"python3.8": [ARM64, X86_64],
"python3.9": [ARM64, X86_64],
"python3.10": [ARM64, X86_64],
"python3.11": [ARM64, X86_64],
"ruby2.7": [ARM64, X86_64],
"ruby3.2": [ARM64, X86_64],
"java8": [ARM64, X86_64],
Expand Down
2 changes: 1 addition & 1 deletion aws_lambda_builders/workflows/python_pip/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def build_dependencies(artifacts_dir_path,
:type runtime: str
:param runtime: Python version to build dependencies for. This can
either be python3.7, python3.8, python3.9 or python3.10. These are
either be python3.7, python3.8, python3.9, python3.10 or python3.11. These are
currently the only supported values.
:type ui: :class:`lambda_builders.actions.python_pip.utils.UI`
Expand Down
3 changes: 2 additions & 1 deletion aws_lambda_builders/workflows/python_pip/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def get_lambda_abi(runtime):
"python3.8": "cp38",
"python3.9": "cp39",
"python3.10": "cp310",
"python3.11": "cp311",
}

if runtime not in supported:
Expand All @@ -100,7 +101,7 @@ def __init__(self, runtime, osutils=None, dependency_builder=None, architecture=
:type runtime: str
:param runtime: Python version to build dependencies for. This can
either be python3.7, python3.8, python3.9 or python3.10. These are currently the
either be python3.7, python3.8, python3.9, python3.10 or python3.11. These are currently the
only supported values.
:type osutils: :class:`lambda_builders.utils.OSUtils`
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def read_version():
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet",
"Topic :: Software Development :: Build Tools",
"Topic :: Utilities",
Expand Down
11 changes: 6 additions & 5 deletions tests/integration/workflows/python_pip/test_python_pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
logger = logging.getLogger("aws_lambda_builders.workflows.python_pip.workflow")
IS_WINDOWS = platform.system().lower() == "windows"
NOT_ARM = platform.processor() != "aarch64"
ARM_RUNTIMES = {"python3.8", "python3.9", "python3.10"}
ARM_RUNTIMES = {"python3.8", "python3.9", "python3.10", "python3.11"}


@parameterized_class(("experimental_flags",), [([]), ([EXPERIMENTAL_FLAG_BUILD_PERFORMANCE])])
Expand Down Expand Up @@ -62,6 +62,7 @@ def setUp(self):
"python3.8": "python3.9",
"python3.9": "python3.7",
"python3.10": "python3.9",
"python3.11": "python3.10",
}

def tearDown(self):
Expand Down Expand Up @@ -94,7 +95,7 @@ def test_must_build_python_project(self):
experimental_flags=self.experimental_flags,
)

if self.runtime == "python3.10":
if self.runtime in ("python3.10", "python3.11"):
self.check_architecture_in("numpy-1.23.5.dist-info", ["manylinux2014_x86_64", "manylinux1_x86_64"])
expected_files = self.test_data_files.union({"numpy", "numpy-1.23.5.dist-info", "numpy.libs"})
else:
Expand All @@ -121,7 +122,7 @@ def test_must_build_python_project_python3_binary(self):
executable_search_paths=[executable_dir],
)

if self.runtime == "python3.10":
if self.runtime in ("python3.10", "python3.11"):
self.check_architecture_in("numpy-1.23.5.dist-info", ["manylinux2014_x86_64", "manylinux1_x86_64"])
expected_files = self.test_data_files.union({"numpy", "numpy-1.23.5.dist-info", "numpy.libs"})
else:
Expand Down Expand Up @@ -166,12 +167,12 @@ def test_must_build_python_project_with_arm_architecture(self):
experimental_flags=self.experimental_flags,
)
expected_files = self.test_data_files.union({"numpy", "numpy.libs", "numpy-1.20.3.dist-info"})
if self.runtime == "python3.10":
if self.runtime in ("python3.10", "python3.11"):
expected_files = self.test_data_files.union({"numpy", "numpy.libs", "numpy-1.23.5.dist-info"})
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

if self.runtime == "python3.10":
if self.runtime in ("python3.10", "python3.11"):
self.check_architecture_in("numpy-1.23.5.dist-info", ["manylinux2014_aarch64"])
else:
self.check_architecture_in("numpy-1.20.3.dist-info", ["manylinux2014_aarch64"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ numpy==1.17.4; python_version == '3.6'
numpy==1.20.3; python_version == '3.7'
numpy==1.20.3; python_version == '3.8'
numpy==1.20.3; python_version == '3.9'
numpy==1.23.5; python_version == '3.10'
numpy==1.23.5; python_version == '3.10'
numpy==1.23.5; python_version == '3.11'
3 changes: 3 additions & 0 deletions tests/unit/workflows/python_pip/test_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def test_get_lambda_abi_python39(self):
def test_get_lambda_abi_python310(self):
assert "cp310" == get_lambda_abi("python3.10")

def test_get_lambda_abi_python311(self):
assert "cp311" == get_lambda_abi("python3.11")


class TestPythonPipDependencyBuilder(object):
def test_can_call_dependency_builder(self, osutils):
Expand Down

0 comments on commit 24653d8

Please sign in to comment.