diff --git a/automaton/machines.py b/automaton/machines.py index 2c5bc76..5222b57 100644 --- a/automaton/machines.py +++ b/automaton/machines.py @@ -14,11 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -try: - from collections import OrderedDict # noqa -except ImportError: - from ordereddict import OrderedDict # noqa - import collections from debtcollector import removals @@ -81,7 +76,7 @@ class FiniteMachine(object): " recommended.") def __init__(self, default_start_state=None): self._transitions = {} - self._states = OrderedDict() + self._states = collections.OrderedDict() self._default_start_state = default_start_state self._current = None self.frozen = False @@ -143,7 +138,7 @@ class FiniteMachine(object): 'on_enter': on_enter, 'on_exit': on_exit, } - self._transitions[state] = OrderedDict() + self._transitions[state] = collections.OrderedDict() def add_reaction(self, state, event, reaction, *args, **kwargs): """Adds a reaction that may get triggered by the given event & state. diff --git a/requirements.txt b/requirements.txt index 4ee4313..058d524 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,8 +11,5 @@ six>=1.9.0 # For deprecation of things debtcollector>=0.3.0 # Apache-2.0 -# Only needed on python 2.6 -ordereddict - # For pretty formatting machines/state tables... PrettyTable<0.8,>=0.7 diff --git a/setup.cfg b/setup.cfg index dc3de7c..80cadef 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,7 +13,6 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX Programming Language :: Python :: 2 - Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.4