Repository navigation
Stop calling the deprecated Host.send_command_sync() - #1004
Merged
barbibulle merged 1 commit intoOct 10, 2026
Merged
Conversation
Host.send_command_sync() is deprecated in favor of spawning send_async_command() with utils.AsyncRunner.spawn(), but the SMP, L2CAP and Device code still call it, so every pairing, connection parameter update and BR/EDR connection request emits a DeprecationWarning from within Bumble itself. Spawn send_async_command() directly in those places.
Contributor
|
Nice work. I wanted to submit this today, but you preempted me. It would be good to get this merged so that my test suite stops flooding me with deprecation warnings :) |
barbibulle
approved these changes
Oct 10, 2026
barbibulle
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the improvements
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.
Host.send_command_sync()is deprecated in favor ofutils.AsyncRunner.spawn(host.send_async_command(...)), but Bumble still calls it internally, so any user gets a warning on every pairing:This replaces the remaining internal callers:
smp.Session.start_encryption()l2cap.ChannelManager.on_l2cap_connection_parameter_update_request()Device.on_connection_request()(accept and reject)Behavior is unchanged:
send_command_sync()was already just a wrapper around that spawn.Tested:
pytest tests/smp_test.py tests/l2cap_test.py tests/device_test.py tests/self_test.py -W "error:Use utils.AsyncRunner:DeprecationWarning": 243 passed.blackandmypyare clean.