Remove 2.6 classifier + 2.6 compatibility code
Depends-On: I2ea92dfdc78b645d2322b91d94c9469bf639b27f Change-Id: I2c6ec5fdec80184b1d03c21a901494ebf4ad0b71
This commit is contained in:
parent
59d34fa3ed
commit
9008f5e067
|
@ -14,11 +14,6 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
try:
|
|
||||||
from collections import OrderedDict # noqa
|
|
||||||
except ImportError:
|
|
||||||
from ordereddict import OrderedDict # noqa
|
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
from debtcollector import removals
|
from debtcollector import removals
|
||||||
|
@ -81,7 +76,7 @@ class FiniteMachine(object):
|
||||||
" recommended.")
|
" recommended.")
|
||||||
def __init__(self, default_start_state=None):
|
def __init__(self, default_start_state=None):
|
||||||
self._transitions = {}
|
self._transitions = {}
|
||||||
self._states = OrderedDict()
|
self._states = collections.OrderedDict()
|
||||||
self._default_start_state = default_start_state
|
self._default_start_state = default_start_state
|
||||||
self._current = None
|
self._current = None
|
||||||
self.frozen = False
|
self.frozen = False
|
||||||
|
@ -143,7 +138,7 @@ class FiniteMachine(object):
|
||||||
'on_enter': on_enter,
|
'on_enter': on_enter,
|
||||||
'on_exit': on_exit,
|
'on_exit': on_exit,
|
||||||
}
|
}
|
||||||
self._transitions[state] = OrderedDict()
|
self._transitions[state] = collections.OrderedDict()
|
||||||
|
|
||||||
def add_reaction(self, state, event, reaction, *args, **kwargs):
|
def add_reaction(self, state, event, reaction, *args, **kwargs):
|
||||||
"""Adds a reaction that may get triggered by the given event & state.
|
"""Adds a reaction that may get triggered by the given event & state.
|
||||||
|
|
|
@ -11,8 +11,5 @@ six>=1.9.0
|
||||||
# For deprecation of things
|
# For deprecation of things
|
||||||
debtcollector>=0.3.0 # Apache-2.0
|
debtcollector>=0.3.0 # Apache-2.0
|
||||||
|
|
||||||
# Only needed on python 2.6
|
|
||||||
ordereddict
|
|
||||||
|
|
||||||
# For pretty formatting machines/state tables...
|
# For pretty formatting machines/state tables...
|
||||||
PrettyTable<0.8,>=0.7
|
PrettyTable<0.8,>=0.7
|
||||||
|
|
|
@ -13,7 +13,6 @@ classifier =
|
||||||
License :: OSI Approved :: Apache Software License
|
License :: OSI Approved :: Apache Software License
|
||||||
Operating System :: POSIX
|
Operating System :: POSIX
|
||||||
Programming Language :: Python :: 2
|
Programming Language :: Python :: 2
|
||||||
Programming Language :: Python :: 2.6
|
|
||||||
Programming Language :: Python :: 2.7
|
Programming Language :: Python :: 2.7
|
||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3.3
|
Programming Language :: Python :: 3.3
|
||||||
|
|
Loading…
Reference in New Issue