diff --git a/flytekit/common/tasks/sdk_runnable.py b/flytekit/common/tasks/sdk_runnable.py index 68fc421ad4..7f60e9fd85 100644 --- a/flytekit/common/tasks/sdk_runnable.py +++ b/flytekit/common/tasks/sdk_runnable.py @@ -1,6 +1,9 @@ from __future__ import absolute_import -from inspect import getargspec as _getargspec +try: + from inspect import getfullargspec as _getargspec +except ImportError: + from inspect import getargspec as _getargspec import six as _six diff --git a/flytekit/common/tasks/spark_task.py b/flytekit/common/tasks/spark_task.py index f00cff7a99..aab02bdc1c 100644 --- a/flytekit/common/tasks/spark_task.py +++ b/flytekit/common/tasks/spark_task.py @@ -1,6 +1,9 @@ from __future__ import absolute_import -from inspect import getargspec as _getargspec +try: + from inspect import getfullargspec as _getargspec +except ImportError: + from inspect import getargspec as _getargspec import os as _os import pyspark as _pyspark