Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove python 3.8 support #7908

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
--amend
  • Loading branch information
mbfreder committed Feb 28, 2025
commit 0d4ef7e5ec49b41ea41504f438b828c57b6d508c
21 changes: 12 additions & 9 deletions tests/unit/commands/init/test_cli.py
Original file line number Diff line number Diff line change
@@ -47,6 +47,9 @@ def __init__(self, no_interactive=False):


class TestCli(TestCase):

maxDiff = None

def setUp(self):
self.ctx = None
self.no_interactive = True
@@ -1886,7 +1889,7 @@ def test_init_cli_image_pool_with_base_image_having_one_managed_template_with_pr
):
init_options_from_manifest_mock.return_value = [
{
"directory": "python3.8-image/cookiecutter-ml-apigw-pytorch",
"directory": "python3.9-image/cookiecutter-ml-apigw-pytorch",
"displayName": "PyTorch Machine Learning Inference API",
"dependencyManager": "pip",
"appTemplate": "ml-apigw-pytorch",
@@ -1898,7 +1901,7 @@ def test_init_cli_image_pool_with_base_image_having_one_managed_template_with_pr
no_interactive=True,
pt_explicit=True,
package_type="Image",
base_image="amazon/python3.8-base",
base_image="amazon/python3.9-base",
dependency_manager="pip",
app_template="ml-apigw-pytorch", # same value as appTemplate indicated in the manifest above
name=self.name,
@@ -1915,7 +1918,7 @@ def test_init_cli_image_pool_with_base_image_having_one_managed_template_with_pr
generate_project_patch.assert_called_once_with(
ANY, # location
"Image", # package_type
"python3.8", # runtime
"python3.9", # runtime
"pip", # dependency_manager
self.output_dir,
self.name,
@@ -1936,7 +1939,7 @@ def test_init_cli_image_pool_with_base_image_having_one_managed_template_with_pr
):
init_options_from_manifest_mock.return_value = [
{
"directory": "python3.8-image/cookiecutter-ml-apigw-pytorch",
"directory": "python3.9-image/cookiecutter-ml-apigw-pytorch",
"displayName": "PyTorch Machine Learning Inference API",
"dependencyManager": "pip",
"appTemplate": "ml-apigw-pytorch",
@@ -1949,7 +1952,7 @@ def test_init_cli_image_pool_with_base_image_having_one_managed_template_with_pr
no_interactive=True,
pt_explicit=True,
package_type="Image",
base_image="amazon/python3.8-base",
base_image="amazon/python3.9-base",
dependency_manager="pip",
app_template="NOT-ml-apigw-pytorch", # different value than appTemplate shown in the manifest above
name=self.name,
@@ -2185,7 +2188,7 @@ def test_must_return_runtime_from_base_image_name(self):
"amazon/go1.x-base",
"amazon/java11-base",
"amazon/nodejs20.x-base",
"amazon/python3.8-base",
"amazon/python3.9-base",
"amazon/go-provided.al2-base",
"amazon/ruby3.2-base",
]
@@ -2195,7 +2198,7 @@ def test_must_return_runtime_from_base_image_name(self):
"go1.x",
"java11",
"nodejs20.x",
"python3.8",
"python3.9",
"go (provided.al2)",
"ruby3.2",
]
@@ -2266,10 +2269,10 @@ def test_must_process_manifest(self, _get_manifest_mock):
}
]
},
"python3.8": {
"python3.9": {
"Image": [
{
"directory": "python3.8-image/cookiecutter-aws-sam-hello-python-lambda-image",
"directory": "python3.9-image/cookiecutter-aws-sam-hello-python-lambda-image",
"displayName": "Hello World Lambda Image Example",
"dependencyManager": "pip",
"appTemplate": "hello-world-lambda-image",
Original file line number Diff line number Diff line change
@@ -1212,6 +1212,9 @@ def test_validate_referenced_resource_matches_sam_metadata_type_invalid_types(
([Mock(stdout="Python 3.10.12")], "python3"),
(
[
Mock(stdout="Python 3.6.10"),
Mock(stdout="Python 3.0.10"),
Mock(stdout="Python 2.7.10"),
Mock(stdout="Python 3.12.1"),
],
"py",
4 changes: 1 addition & 3 deletions tests/unit/lib/build_module/test_workflow_config.py
Original file line number Diff line number Diff line change
@@ -16,9 +16,7 @@ def setUp(self):
self.project_dir = ""
EventTracker.clear_trackers()

@parameterized.expand(
[("python3.9",), ("python3.10",), ("python3.11",), ("python3.12",), ("python3.13",)]
)
@parameterized.expand([("python3.9",), ("python3.10",), ("python3.11",), ("python3.12",), ("python3.13",)])
def test_must_work_for_python(self, runtime):
result = get_workflow_config(runtime, self.code_dir, self.project_dir)
self.assertEqual(result.language, "python")
1 change: 0 additions & 1 deletion tests/unit/local/docker/test_lambda_container.py
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@
Runtime.nodejs18x.value,
Runtime.nodejs20x.value,
Runtime.nodejs22x.value,
Runtime.python38.value,
Runtime.python39.value,
Runtime.python310.value,
Runtime.python311.value,
1 change: 0 additions & 1 deletion tests/unit/local/docker/test_lambda_debug_settings.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@
Runtime.nodejs18x,
Runtime.nodejs20x,
Runtime.nodejs22x,
Runtime.python38,
Runtime.python39,
Runtime.python310,
Runtime.python311,
Loading
Oops, something went wrong.