Skip to content

current_state in Docs #604

Description

@vincedbowen

In the docs current_state is still shown as an API, but when using the getter (per the upgrade guide) you receive a depreciation warning. This maybe deserves an update in the docs saying it is depreciated.

API Docs

Also if I use the setter I do not get a depreciation warning. Is that desired behavior?

from statemachine import State, StateMachine

class SM(StateMachine):
    a = State("a", initial=True)
    b = State("b")

    ab = a.to(b)
    ba = b.to(a)

sm = SM()
sm.current_state = sm.b
print(sm.configuration)

Output

{b}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions