Conversation
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #655.
Event(a.to(b), internal=True)was preserved on the declaration but never reached the queue:Event.__get__built theBoundEventwithoutinternal, sosm.go()always put on the external queue.StateChart.sendreaddelayfrom the declared event but notinternal, sosm.send("go")ignored it too.Fix: pass
internalthrough in__get__, and insendfall back to the declared event'sinternalwhen the caller did not passinternal=True(same precedence asdelay).Per the issue notes: dropped the "
internalstill has no effect at trigger time" caveat fromdocs/releases/3.2.2.md, added a 3.2.2 release-notes entry, and listed the declarative form in the queue table indocs/processing_model.md.Tests
TestExplicitEvent.test_declared_internal_puts_on_the_internal_queue(parametrized oversm.light()andsm.send("light")) records theinternalflag passed to the engine'sput. It fails ondevelopfor both paths ([False]) and passes with this change.uv run pytest: 2020 passed, 144 skipped, 44 xfaileduv run ruff check/ruff format --check/mypy statemachine: clean