Merge "Remove 2.6 classifier + 2.6 compatibility code"

This commit is contained in:
Jenkins 2015-06-27 05:35:28 +00:00 committed by Gerrit Code Review
commit 9094074e5b
3 changed files with 2 additions and 11 deletions

View File

@ -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.

View File

@ -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

View File

@ -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