-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] Remove Python Bluetooth and ChipStack event loop integration #33775
[Python] Remove Python Bluetooth and ChipStack event loop integration #33775
Conversation
Note that the event loop integration is rather hacky anyways. Especially on the Linux side this could be done much nicer with Python asyncio and GLib. This StackOverflow answer has the basics: Essentially instead of creating a MainLoop on GLib side, simply |
PR #33775: Size comparison from d15f6c1 to 11130f0 Full report (8 builds for cc32xx, mbed, qpg, stm32, tizen)
|
The Python Bluetooth implementation for Linux (`BluezManager` in ChipBluezMgr.py) and macOS (`CoreBluetoothManager` in ChipCoreBluetoothMgr.py) integrate with ChipStack to pump their event loops on long running operations such as commissioning (through `CallAsyncWithCompleteCallback()`). From what I can tell, the Python Bluetooth stack is only used for some mbed integration tests. Specifically through `scan_chip_ble_devices()` in src/test_driver/mbed/integration_tests/common/utils.py. This operation doesn't need the event loop integration. So as a first step, this PR simply breaks this tie and removes the event loop integration with the Device ChipStack/ChipDeviceController.
11130f0
to
cf87fd8
Compare
PR #33775: Size comparison from d15f6c1 to cf87fd8 Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
The Python Bluetooth implementation for Linux (
BluezManager
in ChipBluezMgr.py) and macOS (CoreBluetoothManager
in ChipCoreBluetoothMgr.py) integrate with ChipStack to pump their event loops on long running operations such as commissioning (throughCallAsyncWithCompleteCallback()
). From what I can tell this is no longer used as the Bluetooth communication is entirely handled by the respective native implementations for Linux and macOS today. It seems the Python Bluetooth managers are only used for some mbed integration tests. Specifically throughscan_chip_ble_devices()
in src/test_driver/mbed/integration_tests/common/utils.py. This operation anyway busy wait during scanning and don't need any event loop integration.So as a first step, this PR simply breaks this tie and removes the event loop integration with the Device ChipStack/ChipDeviceController.