Merge "Drop ordereddict from requirements"
This commit is contained in:
commit
dc755bcfcf
@ -12,6 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import collections
|
||||||
import inspect
|
import inspect
|
||||||
import types
|
import types
|
||||||
|
|
||||||
@ -20,11 +21,6 @@ import murano.dsl.typespec as typespec
|
|||||||
import murano.dsl.virtual_exceptions as virtual_exceptions
|
import murano.dsl.virtual_exceptions as virtual_exceptions
|
||||||
import murano.dsl.yaql_expression as yaql_expression
|
import murano.dsl.yaql_expression as yaql_expression
|
||||||
|
|
||||||
try:
|
|
||||||
from collections import OrderedDict # noqa
|
|
||||||
except ImportError: # python2.6
|
|
||||||
from ordereddict import OrderedDict # noqa
|
|
||||||
|
|
||||||
|
|
||||||
macros.register()
|
macros.register()
|
||||||
virtual_exceptions.register()
|
virtual_exceptions.register()
|
||||||
@ -62,7 +58,7 @@ class MuranoMethod(object):
|
|||||||
if isinstance(arguments_scheme, types.DictionaryType):
|
if isinstance(arguments_scheme, types.DictionaryType):
|
||||||
arguments_scheme = [{key: value} for key, value in
|
arguments_scheme = [{key: value} for key, value in
|
||||||
arguments_scheme.iteritems()]
|
arguments_scheme.iteritems()]
|
||||||
self._arguments_scheme = OrderedDict()
|
self._arguments_scheme = collections.OrderedDict()
|
||||||
for record in arguments_scheme:
|
for record in arguments_scheme:
|
||||||
if not isinstance(record, types.DictionaryType) \
|
if not isinstance(record, types.DictionaryType) \
|
||||||
or len(record) > 1:
|
or len(record) > 1:
|
||||||
@ -102,7 +98,7 @@ class MuranoMethod(object):
|
|||||||
defaults = func_info.defaults or tuple()
|
defaults = func_info.defaults or tuple()
|
||||||
for i in xrange(len(defaults)):
|
for i in xrange(len(defaults)):
|
||||||
data[i + len(data) - len(defaults)][1]['Default'] = defaults[i]
|
data[i + len(data) - len(defaults)][1]['Default'] = defaults[i]
|
||||||
result = OrderedDict([
|
result = collections.OrderedDict([
|
||||||
(name, typespec.ArgumentSpec(
|
(name, typespec.ArgumentSpec(
|
||||||
declaration, self._namespace_resolver))
|
declaration, self._namespace_resolver))
|
||||||
for name, declaration in data])
|
for name, declaration in data])
|
||||||
|
@ -12,7 +12,6 @@ Routes>=1.12.3,!=2.0
|
|||||||
WebOb>=1.2.3
|
WebOb>=1.2.3
|
||||||
wsgiref>=0.1.2
|
wsgiref>=0.1.2
|
||||||
argparse
|
argparse
|
||||||
ordereddict
|
|
||||||
kombu>=2.5.0
|
kombu>=2.5.0
|
||||||
lockfile>=0.8
|
lockfile>=0.8
|
||||||
pycrypto>=2.6
|
pycrypto>=2.6
|
||||||
|
Loading…
Reference in New Issue
Block a user