Python-statemachine

Latest version: v2.1.2

Safety actively analyzes 613460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.1.2

- Fixes [406](https://github.com/fgmacedo/python-statemachine/issues/406) action callback being
called twice when mixing decorator syntax combined with the naming convention.

2.1.1

- Fixes [391](https://github.com/fgmacedo/python-statemachine/issues/391) adding support to
[pytest-mock](https://pytest-mock.readthedocs.io/en/latest/index.html) `spy` method.
- Improved factory type hints [399](https://github.com/fgmacedo/python-statemachine/pull/399).

2.1.0

- Fixes [369](https://github.com/fgmacedo/python-statemachine/issues/369) adding support to wrap
methods used as [Actions](https://python-statemachine.readthedocs.io/en/2.1.0/actions.html#actions) decorated with `functools.partial`.
- Fixes [384](https://github.com/fgmacedo/python-statemachine/issues/384) so multiple observers can watch the same callback.

2.0

`State.identification` removed in favor of `State.id`

py
from tests.examples.traffic_light_machine import TrafficLightMachine

sm = TrafficLightMachine()
assert sm.current_state.identification == "green"



Should become:

py
>>> from tests.examples.traffic_light_machine import TrafficLightMachine

>>> sm = TrafficLightMachine()
>>> assert sm.current_state.id == "green"

2.0.0

This version is the first to take advantage of the Python3 improvements and is a huge internal refactoring removing the deprecated features on 1.*. We hope that you enjoy it.

These release notes cover the what's new in 2.0, as well as some backward incompatible changes you'll
want to be aware of when upgrading from StateMachine `1.*`.


Python compatibility in 2.0

StateMachine 2.0 supports Python 3.7, 3.8, 3.9, 3.10, and 3.11.

1.0.3

*January 27, 2023*


StateMachine 1.0.3 fixes a bug between {ref}`State` and {ref}`transition` instances sharing
references of callbacks when there were multiple concurrent instances of the same `StateMachine`
class.


Bugfixes

- [334](https://github.com/fgmacedo/python-statemachine/issues/334): Fixed a shared reference
of callbacks when there were multiple concurrent instances of the same `StateMachine` class.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.