Avatar for the Bluetooth-Devices user
Bluetooth-Devices
dbus-fast
BlogDocsChangelog

Performance History

Latest Results

test: cover transport fallback in aio connect() and sync _setup_socket() Adds two tests exercising the unix -> tcp fallback path: - aio MessageBus.connect() with a multi-transport address where the first entry fails and the next also fails, verifying the loop iterates and raises the last error. - BaseMessageBus._setup_socket() directly, covering the sync fallback path used by the glib bus. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
agners:fix-sync-io-in-messagebus-init
2 days ago
fix!: defer socket.connect() from __init__ to connect() in aio MessageBus BREAKING CHANGE: For the aio MessageBus, connection errors are now raised from connect() instead of __init__. Code that catches exceptions from MessageBus() instantiation must be updated to catch them from connect() instead. Previously, BaseMessageBus.__init__() called _setup_socket() which performed a blocking socket.connect() call. This violated async design principles - an async library should not perform blocking I/O in __init__. This caused issues with tools like blockbuster that detect blocking calls in async contexts (e.g., Home Assistant Supervisor). Changes: - BaseMessageBus.__init__() no longer calls _setup_socket(); subclasses are responsible for triggering socket setup. - glib MessageBus.__init__() explicitly calls _setup_socket() to preserve its existing blocking-connect behavior (the glib path is intentionally left unchanged otherwise). - aio MessageBus.connect() now iterates the configured transports, creates a socket for each, and awaits loop.sock_connect(), falling back to the next transport on failure. The unix -> tcp fallback is preserved. - Factored out _create_socket_for_transport() helper so the sync (_setup_socket) and async (connect) paths share transport parsing. - _setup_socket is cpdef so it can be called from Python subclasses. - Added .. versionchanged:: 5.0.0 notes and expanded :raises: on aio MessageBus.connect() and the class docstring. Fixes blocking I/O detection errors like: blockbuster.BlockingError: Blocking call to socket.socket.connect šŸ¤– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
agners:fix-sync-io-in-messagebus-init
6 days ago

Latest Branches

CodSpeed Performance Gauge
0%
fix!: defer socket.connect() from __init__ to connect()#570
2 days ago
96f11a9
agners:fix-sync-io-in-messagebus-init
CodSpeed Performance Gauge
0%
chore(deps-dev): bump pytest-codspeed from 4.3.0 to 4.4.0#616
3 days ago
e5c1583
dependabot/pip/pytest-codspeed-4.4.0
CodSpeed Performance Gauge
0%
3 days ago
766c8f5
pre-commit-ci-update-config
Ā© 2026 CodSpeed Technology
Home Terms Privacy Docs