From cda07fb00ef296e22f389f7de86ff8fc8245b95c Mon Sep 17 00:00:00 2001 From: Ruslan Kamaldinov Date: Sat, 13 Dec 2014 18:21:25 +0300 Subject: [PATCH] Drop ordereddict from requirements ordereddict was present in requirements.txt to maintain compatibility with Python 2.6. OpenStack dropped py2.6 support starting from Kilo. Thus there is no need to maintain this requirement. Change-Id: I7a1a7555a007a5f905fd0e8af1b3929476655695 --- murano/dsl/murano_method.py | 10 +++------- requirements.txt | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/murano/dsl/murano_method.py b/murano/dsl/murano_method.py index f9b81866..dfded992 100644 --- a/murano/dsl/murano_method.py +++ b/murano/dsl/murano_method.py @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. +import collections import inspect import types @@ -20,11 +21,6 @@ import murano.dsl.typespec as typespec import murano.dsl.virtual_exceptions as virtual_exceptions 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() virtual_exceptions.register() @@ -62,7 +58,7 @@ class MuranoMethod(object): if isinstance(arguments_scheme, types.DictionaryType): arguments_scheme = [{key: value} for key, value in arguments_scheme.iteritems()] - self._arguments_scheme = OrderedDict() + self._arguments_scheme = collections.OrderedDict() for record in arguments_scheme: if not isinstance(record, types.DictionaryType) \ or len(record) > 1: @@ -102,7 +98,7 @@ class MuranoMethod(object): defaults = func_info.defaults or tuple() for i in xrange(len(defaults)): data[i + len(data) - len(defaults)][1]['Default'] = defaults[i] - result = OrderedDict([ + result = collections.OrderedDict([ (name, typespec.ArgumentSpec( declaration, self._namespace_resolver)) for name, declaration in data]) diff --git a/requirements.txt b/requirements.txt index 9576c8c2..859e21fc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,6 @@ Routes>=1.12.3,!=2.0 WebOb>=1.2.3 wsgiref>=0.1.2 argparse -ordereddict kombu>=2.5.0 lockfile>=0.8 pycrypto>=2.6