Merge "Python3: Use six.moves for py2 compatibility"
This commit is contained in:
commit
ed6bd4e526
murano
dsl
engine/system
tests/unit
@ -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
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
|
||||
import six
|
||||
from six.moves import range
|
||||
|
||||
from murano.dsl import constants
|
||||
from murano.dsl import dsl_exception
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -18,6 +18,7 @@ import collections
|
||||
import random
|
||||
import re
|
||||
import six
|
||||
from six.moves import range
|
||||
import string
|
||||
import time
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user