This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
FrozenNFA constructor attempts to call deepcopy on frozendicts #8
Comments
Good morning @no-preserve-root! I will have a look at this after work. If you have a fix, feel free to submit a PR to the Dev branch 🙂 |
(Im-)mutability seems to be a larger issue with automata-lib 7. Since the automata-lib types are all immutable now, setters can not work as intended any more; also some protected attributes were renamed. I would be willing to try and write a patch for this, but my suggestion would be to
What do you think @lewiuberg? |
I haven't looked at this library or automata-lib for some time, but I think you are correct 👍🏻 I'll have a look at this today or tomorrow, depending on work. |
Is there any update on solutions for resolving this issue? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
VisualNFA
constructor attempts to create a deep copy of the passednfa
, especially thetransitions
dictionary:visual-automata/visual_automata/fa/nfa.py
Line 469 in 3ea0cdc
The
deepcopy
method is monkeypatched onto dict viacurse
:visual-automata/visual_automata/fa/nfa.py
Line 32 in 3ea0cdc
However, automata-lib 7.0.1 returns a
frozendict
from the frozendict package instead, so the method call fails. It is not clear if copying thefrozendict
is at all necessary;deepcopy
returns the object as-is.MRE
Using most recent versions:
Expected Behavior
The automaton is shown.
Actual Behavior
The text was updated successfully, but these errors were encountered: