You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: eliminate for_instance() cache — store InstanceState in sm.__dict__
Remove the State descriptor protocol (__get__/__set__) and for_instance()
cache. InstanceState objects are now created eagerly in StateChart.__init__
and stored directly in sm.__dict__, making sm.<state_id> a plain dict
lookup instead of a descriptor call + cache lookup.
Configuration no longer holds a weakref to the machine; it receives a
dedicated instance_states dict and resolves active states via direct
dict lookup.
The __setattr__ guard on StateChart preserves the existing protection
against accidental state overriding. States whose id collides with an
event name are kept out of __dict__ to preserve Event descriptor
priority.
Fix type mismatches in engines/base.py and event_data.py that were
previously masked by the State.__set__ descriptor.
0 commit comments