Add Support for Bleak 1.1.1 #155
Open
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.
This pull request refactors the platform-specific GATT characteristic and service classes for BlueZ DBus, CoreBluetooth, and WinRT backends to use the unified
BleakGATTCharacteristicandBleakGATTServicebase classes frombleak.backends.characteristicandbleak.backends.service. It removes backend-specific Bleak imports and updates the initialization and attribute management for improved compatibility and maintainability. The changes also add or update properties and methods for characteristic/service metadata and descriptor management.Refactoring for Bleak compatibility and codebase simplification:
BlessGATTCharacteristicBlueZDBus,BlessGATTCharacteristicCoreBluetooth,BlessGATTCharacteristicWinRT) now inherit from the unifiedBleakGATTCharacteristicinstead of backend-specific Bleak classes, and their constructors andinitmethods are updated to set attributes expected by Bleak. [1] [2] [3]BlessGATTServiceBlueZDBus,BlessGATTServiceCoreBluetooth) now inherit from the unifiedBleakGATTService, and their constructors andinitmethods are updated to set attributes expected by Bleak. [1] [2]Characteristic and service metadata/property improvements:
service_uuid,service_handle,handle,properties,descriptors,max_write_without_response_size,description, anduuidto all characteristic classes for consistency and Bleak compatibility. [1] [2] [3]description,characteristics, anduuidto service classes, including new methods for adding and retrieving characteristics and descriptors. [1] [2]Descriptor and characteristic management:
add_descriptor,get_descriptor,add_characteristic,get_characteristic) for both characteristics and services, improving extensibility and backend compatibility. [1] [2] [3] [4]Initialization and attribute assignment updates:
obj,path,_service_uuid,_handle,_max_write_without_response_size, etc.) directly, removing legacy Bleak-specific initialization and simplifying attribute management. [1] [2] [3] [4] [5]Removal of legacy and backend-specific Bleak imports:
bleak.backends.characteristicandbleak.backends.servicemodules, reducing code duplication and improving maintainability. [1] [2] [3] [4] [5]