Skip to content

Commit 2dfcae3

Browse files
manmartgarcjamesls
authored andcommitted
Add support for Python 3.9
1 parent 5177dea commit 2dfcae3

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ chalice.egg-info/
1010
.pytest_cache/
1111
.mypy_cache/
1212
*.pyc
13-
.vscode
13+
.vscode

chalice/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ def lambda_python_version(self):
163163
return 'python3.6'
164164
elif (major, minor) <= (3, 7):
165165
return 'python3.7'
166-
return 'python3.8'
166+
elif (major, minor) <= (3, 8):
167+
return 'python3.8'
168+
return 'python3.9'
167169

168170
@property
169171
def layers(self):

chalice/deploy/packager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class BaseLambdaDeploymentPackager(object):
7777
'python3.6': 'cp36m',
7878
'python3.7': 'cp37m',
7979
'python3.8': 'cp38',
80+
'python3.9': 'cp39'
8081
}
8182

8283
def __init__(self, osutils, dependency_builder, ui):

tests/functional/cli/test_cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ def test_error_when_no_deployed_record(runner, mock_cli_factory):
413413
reason="Cannot generate pipeline for python3.7.")
414414
@pytest.mark.skipif(sys.version_info[:2] == (3, 8),
415415
reason="Cannot generate pipeline for python3.8.")
416+
@pytest.mark.skipif(sys.version_info[:2] == (3, 9),
417+
reason="Cannot generate pipeline for python3.9.")
416418
def test_can_generate_pipeline_for_all(runner):
417419
with runner.isolated_filesystem():
418420
newproj.create_new_project_skeleton('testproject')

tests/unit/test_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,10 @@ def test_can_load_python_version():
373373
expected_runtime = 'python3.6'
374374
elif minor <= 7:
375375
expected_runtime = 'python3.7'
376-
else:
376+
elif minor <= 8:
377377
expected_runtime = 'python3.8'
378+
else:
379+
expected_runtime = 'python3.9'
378380
assert c.lambda_python_version == expected_runtime
379381

380382

0 commit comments

Comments
 (0)