Closed attila123 closed 4 years ago
Hi @attila123,
So I copy-pasted it to a new .py file in my PyCharm project (transitions==0.7.0 was already added to my requirements.txt and installed in the venv)
Enum support is a currently unreleased feature. It's not supported in 0.7.0. If you want to try it out you have to install transitions
0.7.1 from the repo.
Hi @aleneum, Thank you very much for the quick reply. My project's build system uses dependencies only from pypi (and I don't want to change that), so for now I will then stick with the string based states. Hmm, but I can use string "constants" for the states anyway, and will unit test my code anyway, so it does not hurt much. Just curious: Is the enum based states considered "stable" in master? Any plans to release 0.7.1? Maybe we can leave this issue open until 0.7.1 is released, someone else might bump into this same issue.
Hi @attila123,
Is the enum based states considered "stable" in master?
we haven't encountered major setbacks yet. From my experience it is stable.
Any plans to release 0.7.1?
no specific date so far. If more users consider it stable, we could release mid of September.
Maybe we can leave this issue open until 0.7.1 is released, someone else might bump into this same issue.
Sure, I will close this issue when 0.7.1 is released.
Hi, after reading the documentation I decided to use enums for the states. But I had some crash issue so I tried the example directly from https://github.com/pytransitions/transitions/blob/master/README.md as it is:
So I copy-pasted it to a new .py file in my PyCharm project (transitions==0.7.0 was already added to my requirements.txt and installed in the venv), and run it, and it also crashes (I use Python 3.7.4 in Linux):
To prove that my environment is otherwise OK, with minimal changes I converted the example to string based states and then it runs fine (exits successfully):
As a workaround, I think I will go with the following state name pattern, which will be the easiest to convert back to enums after this issue fixed: