summaryrefslogtreecommitdiff
path: root/taskflow/utils/iter_utils.py
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2022-05-17 22:56:45 +0900
committerTakashi Kajinami <tkajinam@redhat.com>2022-05-18 16:12:37 +0900
commit44f17d005ff53008144ca7c509bcb1307d66b23f (patch)
treeb03024443b92a78f3cdacfca29f4010d24c8b685 /taskflow/utils/iter_utils.py
parentb5b69e8110da44a88b2260cd24ada3439f29938e (diff)
downloadtaskflow-44f17d005ff53008144ca7c509bcb1307d66b23f.tar.gz
Remove six
This library no longer supports Python 2, thus usage of six can be removed. This also removes workaround about pickle library used in Python 2 only. Change-Id: I19d298cf0f402d65f0b142dea0bf35cf992332a9
Diffstat (limited to 'taskflow/utils/iter_utils.py')
-rw-r--r--taskflow/utils/iter_utils.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/taskflow/utils/iter_utils.py b/taskflow/utils/iter_utils.py
index 8591d23..ebf4107 100644
--- a/taskflow/utils/iter_utils.py
+++ b/taskflow/utils/iter_utils.py
@@ -15,15 +15,13 @@
# under the License.
from collections import abc
+import functools
import itertools
-import six
-from six.moves import range as compat_range
-
def _ensure_iterable(func):
- @six.wraps(func)
+ @functools.wraps(func)
def wrapper(it, *args, **kwargs):
if not isinstance(it, abc.Iterable):
raise ValueError("Iterable expected, but '%s' is not"
@@ -147,5 +145,5 @@ def iter_forever(limit):
while True:
yield next(i)
else:
- for i in compat_range(0, limit):
+ for i in range(0, limit):
yield i