diff --git a/aws_lambda_builders/actions.py b/aws_lambda_builders/actions.py index 489e0b722..547935da8 100644 --- a/aws_lambda_builders/actions.py +++ b/aws_lambda_builders/actions.py @@ -5,7 +5,6 @@ import logging import os import shutil -import six from aws_lambda_builders.utils import copytree @@ -58,7 +57,7 @@ def __new__(mcs, name, bases, class_dict): # Validate class variables # All classes must provide a name - if not isinstance(cls.NAME, six.string_types): + if not isinstance(cls.NAME, str): raise ValueError("Action must provide a valid name") if not Purpose.has_value(cls.PURPOSE): @@ -67,7 +66,7 @@ def __new__(mcs, name, bases, class_dict): return cls -class BaseAction(six.with_metaclass(_ActionMetaClass, object)): +class BaseAction(object, metaclass=_ActionMetaClass): """ Base class for all actions. It does not provide any implementation. """ diff --git a/aws_lambda_builders/workflow.py b/aws_lambda_builders/workflow.py index d58f0c430..7aef1bd84 100644 --- a/aws_lambda_builders/workflow.py +++ b/aws_lambda_builders/workflow.py @@ -6,7 +6,6 @@ import logging from collections import namedtuple -import six from aws_lambda_builders.binary_path import BinaryPath from aws_lambda_builders.path_resolver import PathResolver @@ -118,7 +117,7 @@ def __new__(mcs, name, bases, class_dict): # Validate class variables # All classes must provide a name - if not isinstance(cls.NAME, six.string_types): + if not isinstance(cls.NAME, str): raise ValueError("Workflow must provide a valid name") # All workflows must express their capabilities @@ -131,7 +130,7 @@ def __new__(mcs, name, bases, class_dict): return cls -class BaseWorkflow(six.with_metaclass(_WorkflowMetaClass, object)): +class BaseWorkflow(object, metaclass=_WorkflowMetaClass): """ Default implementation of the builder workflow. It provides several useful capabilities out-of-box that help minimize the scope of build actions. diff --git a/requirements/base.txt b/requirements/base.txt index 0150babf3..8b1378917 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1 +1 @@ -six~=1.11 + diff --git a/tests/integration/workflows/python_pip/test_python_pip.py b/tests/integration/workflows/python_pip/test_python_pip.py index 3a0aff97e..ce6bc4aba 100644 --- a/tests/integration/workflows/python_pip/test_python_pip.py +++ b/tests/integration/workflows/python_pip/test_python_pip.py @@ -1,6 +1,5 @@ import os import shutil -import six import sys import platform import tempfile @@ -146,7 +145,7 @@ def test_mismatch_runtime_python_project(self): "Binary validation failed" not in ex_s and "pip executable not found in your python environment" not in ex_s ): - six.raise_from(AssertionError("Unexpected exception"), ex) + raise AssertionError("Unexpected exception") from ex def test_runtime_validate_python_project_fail_open_unsupported_runtime(self): with self.assertRaises(WorkflowFailedError):