diff --git a/murano/dsl/helpers.py b/murano/dsl/helpers.py index e4107028..0adaebb7 100644 --- a/murano/dsl/helpers.py +++ b/murano/dsl/helpers.py @@ -24,6 +24,7 @@ import eventlet.greenpool import eventlet.greenthread import semantic_version import six +from six.moves import reduce import yaql.language.exceptions import yaql.language.expressions from yaql.language import utils as yaqlutils diff --git a/murano/dsl/macros.py b/murano/dsl/macros.py index d8fe91df..53db2ca8 100644 --- a/murano/dsl/macros.py +++ b/murano/dsl/macros.py @@ -14,6 +14,7 @@ import six +from six.moves import range from murano.dsl import constants from murano.dsl import dsl_exception diff --git a/murano/dsl/murano_class.py b/murano/dsl/murano_class.py index 84dd39dd..27ea3755 100644 --- a/murano/dsl/murano_class.py +++ b/murano/dsl/murano_class.py @@ -17,6 +17,7 @@ import weakref import semantic_version import six +from six.moves import range from yaql.language import utils from murano.dsl import constants diff --git a/murano/dsl/yaql_functions.py b/murano/dsl/yaql_functions.py index e1f99cf8..0a041c70 100644 --- a/murano/dsl/yaql_functions.py +++ b/murano/dsl/yaql_functions.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -import itertools - import eventlet import six from yaql.language import specs @@ -75,7 +73,7 @@ def super_(context, sender, func=None): if func is None: return [sender.cast(type) for type in cast_type.parents( sender.real_this.type)] - return itertools.imap(func, super_(context, sender)) + return six.moves.map(func, super_(context, sender)) @specs.parameter('value', dsl_types.MuranoObject) diff --git a/murano/engine/system/yaql_functions.py b/murano/engine/system/yaql_functions.py index 203d3810..0089c5c9 100644 --- a/murano/engine/system/yaql_functions.py +++ b/murano/engine/system/yaql_functions.py @@ -18,6 +18,7 @@ import collections import random import re import six +from six.moves import range import string import time diff --git a/murano/tests/unit/api/v1/test_catalog.py b/murano/tests/unit/api/v1/test_catalog.py index 2f2021d0..19a731d7 100644 --- a/murano/tests/unit/api/v1/test_catalog.py +++ b/murano/tests/unit/api/v1/test_catalog.py @@ -14,7 +14,6 @@ # limitations under the License. import cgi -import cStringIO import imghdr import json import os @@ -22,6 +21,8 @@ import uuid import mock from oslo_utils import timeutils +from six.moves import cStringIO +from six.moves import range from murano.api.v1 import catalog from murano.db.catalog import api as db_catalog_api @@ -497,7 +498,7 @@ class TestCatalogApi(test_base.ControllerTest, test_base.MuranoApiTestCase): self.expect_policy_check('upload_package') self.expect_policy_check('publicize_package') - file_obj_str = cStringIO.StringIO("This is some dummy data") + file_obj_str = cStringIO("This is some dummy data") file_obj = mock.MagicMock(cgi.FieldStorage) file_obj.file = file_obj_str package_from_dir, _ = self._test_package() diff --git a/murano/tests/unit/db/test_catalog.py b/murano/tests/unit/db/test_catalog.py index fb86b7af..d3387dfa 100644 --- a/murano/tests/unit/db/test_catalog.py +++ b/murano/tests/unit/db/test_catalog.py @@ -14,6 +14,7 @@ import uuid from oslo_db import exception as db_exception +from six.moves import range from webob import exc from murano.db.catalog import api diff --git a/murano/tests/unit/dsl/foundation/object_model.py b/murano/tests/unit/dsl/foundation/object_model.py index c7468528..f8a4f7ad 100644 --- a/murano/tests/unit/dsl/foundation/object_model.py +++ b/murano/tests/unit/dsl/foundation/object_model.py @@ -12,6 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +from six.moves import range + from murano.dsl import helpers