Repository navigation
Release v0.12.0 - #575
Merged
Merged
Release v0.12.0#575
Conversation
Merge master back to develop
Handling of undetected devices in connect_by_bledevice example. Correcting typehint in BleakScanner.find_device_by_address Fixes #487.
…er and DataWriter
Also modified service handle type hints in most backends.
This adds a new `BleakScanner.discovered_devices` property to replace the `BleakScanner.get_discovered_devices()` async method. A deprecation warning is added to `BleakScanner.get_discovered_devices()` and the documentation for that method. Fixes #489
This expects the module name rather than the package name, so we have to use an underscore instead of a dash.
Fix linux_autodoc_mock_import in docs/conf.py
This changes the BleakClientCoreBluetooth.get_rssi() method to use the available delegate callbacks in the peripheral delegate. This will ensure that we don't return stale RSSI values and will pass errors as exceptions instead of just returning None.
This fixes #535. In the CoreBluetooth backend, when a device disconnects, none of the peripheral delegate callbacks will be called. So if any futures are pending, they will be waiting forever. This adds a disconnect hook that will raise an exception in all pending futures to avoid this deadlock.
This fixes potential deadlocks when using a service, characteristic or descriptor with the same UUID on the CoreBluetooth backend. Previously, the futures were stored by UUID for later lookup in callbacks. However, since since the same UUID can be used multiple times, we could end up with futures being replaced in a dictionary before they were completed, which would result in a deadlock for the waiter.
This function was only used once and it is just as simple to use the wrapped function directly.
This was not used anywhere.
These methods are only used in Python, so don't need to be Obj-C selectors.
…on. Added example that uses this functionality to find devices by name.
…ameters on the command line
Since we can await the asyncio.Queue, we no longer need an asyncio.Event(). Also remove unused timeout kwarg while we are touching this code.
Discovery filter
Fixed notification value should be bytearray on CoreBluetooth.
Mac cleanup and fixes
This makes use of ObjC-style key-value observer to monitor the isScanning property on CBCentralManager. This allows us to avoid the polling wait. Previously, the wait was only implemented when stopping scanning, so it is added to the start as well. Also, the higher-level function is fixed to allow calling stop() multiple times without raising an error. This is needed since the stop() method can be called by __aexit__() even if the scanner is already stopped.
Wrote details in CHANGELOG.rst
CoreBluetooth scan start/stop improvements
Update changelog and version for release.
This should no longer be needed since 84af9f3.
Owner
|
This was a much larger release than I thought. I am sad to say that I have not had any time to neither test nor read through anything, sorry. Great work handling the maintaining, I hope to have more time this coming fall... |
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.
If there aren't any glaring problems, I publish release tomorrow.
Shortlog
BleakScanner.find_device_by_filter()method.Full Changelog
Added
mtu_sizeproperty for clients.BleakScanner.discovered_devicesproperty.BleakScanner.find_device_by_filterstatic method.scanner_byname.pyexample.Changed
Programming Language :: Python :: 3.9classifier insetup.py.BleakScanner.get_discovered_devices()async method.BleakScanner.BleakDBusErroris converted to string.Union[bytes, bytearray, memoryview].get_rssi()on CoreBluetooth backend.@objc.python_methodwhere possible inPeripheralDelegateclass.BleakScanner.start()andstop()in CoreBluetooth backend.
Fixed
KeyErrorwhen trying to connect toBLEDevicefrom advertisingdata callback on macOS. Fixes Device returned by detection callback is not properly initialized on corebluetooth #448.
connect_by_bledevice.pyexample. Fixes Code working on Linux but not on Windows #487.Optionaltypehint forBleakScanner.find_device_by_address.linux_autodoc_mock_importindocs/conf.py.BleakClientBlueZDBus.pair()method always returningTrue. Fixes BlueZ backend always thinks device is paired? #503.valueshould bebytearrayon CoreBluetooth. Fixes CoreBluetooth: Callback gets_NSInlineData, notbytearray, causing methods to fail #560.CoreBluetooth backend. Fixes Crash on mac after timeout connecting to device #538.
BleakScanneronCoreBluetooth backend.
callbacks are pending. Fixes Program disconnects before connection established. Locks up Bleak #535.
with the same UUID on CoreBluetooth backend.
BleakScanner.stop()when alreadystopped in CoreBluetooth backend.