Skip to content

Commit b4d9a37

Browse files
authored
Merge pull request #262 from aws/develop
Merge 'develop' into 'master'
2 parents 5c0b9bd + 21f9edf commit b4d9a37

File tree

7 files changed

+27
-6
lines changed

7 files changed

+27
-6
lines changed

.appveyor.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ environment:
3434
LINE_COVERAGE: '72'
3535
NEW_FLAKE8: 1
3636
JAVA_HOME: "C:\\Program Files\\Java\\jdk11"
37+
- PYTHON: "C:\\Python39-x64"
38+
PYTHON_VERSION: '3.9'
39+
PYTHON_ARCH: '64'
40+
LINE_COVERAGE: '72'
41+
NEW_FLAKE8: 1
42+
JAVA_HOME: "C:\\Program Files\\Java\\jdk11"
43+
3744

3845

3946
build: off
@@ -42,7 +49,7 @@ for:
4249
-
4350
matrix:
4451
only:
45-
- image: Visual Studio 2017
52+
- image: Visual Studio 2019
4653

4754
environment:
4855
GOPATH: c:\gopath

aws_lambda_builders/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
22
AWS Lambda Builder Library
33
"""
4-
__version__ = "1.5.0"
4+
__version__ = "1.6.0"
55
RPC_PROTOCOL_VERSION = "0.3"

aws_lambda_builders/workflows/python_pip/packager.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ def __init__(self, version):
7272

7373

7474
def get_lambda_abi(runtime):
75-
supported = {"python2.7": "cp27mu", "python3.6": "cp36m", "python3.7": "cp37m", "python3.8": "cp38"}
75+
supported = {
76+
"python2.7": "cp27mu",
77+
"python3.6": "cp36m",
78+
"python3.7": "cp37m",
79+
"python3.8": "cp38",
80+
"python3.9": "cp39",
81+
}
7682

7783
if runtime not in supported:
7884
raise UnsupportedPythonVersion(runtime)
@@ -164,6 +170,7 @@ class DependencyBuilder(object):
164170
"cp36m": (2, 17),
165171
"cp37m": (2, 17),
166172
"cp38": (2, 26),
173+
"cp39": (2, 26),
167174
}
168175
# Fallback version if we're on an unknown python version
169176
# not in _RUNTIME_GLIBC.

aws_lambda_builders/workflows/python_pip/validator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
class PythonRuntimeValidator(object):
16-
SUPPORTED_RUNTIMES = {"python2.7", "python3.6", "python3.7", "python3.8"}
16+
SUPPORTED_RUNTIMES = {"python2.7", "python3.6", "python3.7", "python3.8", "python3.9"}
1717

1818
def __init__(self, runtime):
1919
self.language = "python"

tests/integration/workflows/python_pip/test_python_pip.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import os
22
import shutil
33
import sys
4+
import platform
45
import tempfile
5-
from unittest import TestCase
6+
from unittest import TestCase, skipIf
67
import mock
78

89
from aws_lambda_builders.builder import LambdaBuilder
910
from aws_lambda_builders.exceptions import WorkflowFailedError
1011
import logging
1112

1213
logger = logging.getLogger("aws_lambda_builders.workflows.python_pip.workflow")
14+
IS_WINDOWS = platform.system().lower() == "windows"
1315

1416

1517
class TestPythonPipWorkflow(TestCase):
@@ -44,6 +46,7 @@ def setUp(self):
4446
"python3.7": "python2.7",
4547
"python2.7": "python3.8",
4648
"python3.8": "python2.7",
49+
"python3.9": "python2.7",
4750
}
4851

4952
def tearDown(self):
@@ -84,6 +87,7 @@ def test_runtime_validate_python_project_fail_open_unsupported_runtime(self):
8487
self.source_dir, self.artifacts_dir, self.scratch_dir, self.manifest_path_valid, runtime="python2.8"
8588
)
8689

90+
@skipIf(IS_WINDOWS, "Skip in windows tests")
8791
def test_must_resolve_local_dependency(self):
8892
source_dir = os.path.join(self.source_dir, "local-dependencies")
8993
manifest = os.path.join(source_dir, "requirements.txt")

tests/unit/workflows/python_pip/test_packager.py

+3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ def test_get_lambda_abi_python37(self):
101101
def test_get_lambda_abi_python38(self):
102102
assert "cp38" == get_lambda_abi("python3.8")
103103

104+
def test_get_lambda_abi_python39(self):
105+
assert "cp39" == get_lambda_abi("python3.9")
106+
104107

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

tests/unit/workflows/python_pip/test_validator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TestPythonRuntimeValidator(TestCase):
1919
def setUp(self):
2020
self.validator = PythonRuntimeValidator(runtime="python3.7")
2121

22-
@parameterized.expand(["python2.7", "python3.6", "python3.7", "python3.8"])
22+
@parameterized.expand(["python2.7", "python3.6", "python3.7", "python3.8", "python3.9"])
2323
def test_supported_runtimes(self, runtime):
2424
validator = PythonRuntimeValidator(runtime=runtime)
2525
self.assertTrue(validator.has_runtime())

0 commit comments

Comments
 (0)