Skip to content

Migrate the plugin runtime to asyncio - #34

Merged
strohganoff merged 2 commits into
mainfrom
refactor/async-runtime-migration
Nov 18, 2026
Merged

strohganoff merged 2 commits into
mainfrom
refactor/async-runtime-migration

Conversation

@strohganoff

Copy link
Copy Markdown
Owner

Migrates the plugin runtime to asyncio while keeping the console entry point synchronous and preserving ordered dispatch for both synchronous and asynchronous handlers. WebSocket operations, listener iteration and cleanup, PluginManager.run(), and command-sender methods now use async APIs. Listener cleanup attempts every registration and preserves a primary runtime failure while grouping ordinary cleanup failures.

The README examples reflect the async handler and custom listener contracts. Tests cover listener merging and cleanup, ordered sync/async dispatch, WebSocket lifecycle and error handling, registration payload parity, and cancellation cleanup.

Compatibility: custom listeners and direct PluginManager.run() callers must migrate to the async APIs; command-sender calls must be awaited. Existing synchronous handlers remain supported.

Validation: 201 tests pass on Python 3.10.22 and Python 3.15.2; mypy streamdeck, focused Ruff checks, uv lock --check, and git diff --check pass.

@strohganoff
strohganoff merged commit 7568b8c into main Nov 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant