Skip to content
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

Release v0.12.0 #575

Merged
merged 105 commits into from
Jun 19, 2021
Merged

Release v0.12.0 #575

merged 105 commits into from
Jun 19, 2021

Conversation

dlech
Copy link
Collaborator

@dlech dlech commented Jun 18, 2021

If there aren't any glaring problems, I publish release tomorrow.

Shortlog

  • New WinRT backend for Windows.
  • Python 3.9 support.
  • Overhaul of CoreBluetooth backend.
  • Can now get MTU for connected devices.
  • New, handy BleakScanner.find_device_by_filter() method.

Full Changelog

Added

  • Added mtu_size property for clients.
  • Added WinRT backend.
  • Added BleakScanner.discovered_devices property.
  • Added an event to await when stopping scanners in WinRT and pythonnet backends. Fixes AttributeError in WinRT scanner _stopped_handler() callback #556.
  • Added BleakScanner.find_device_by_filter static method.
  • Added scanner_byname.py example.
  • Added optional command line argument to specify device to all applicable examples.

Changed

  • Added Programming Language :: Python :: 3.9 classifier in setup.py.
  • Deprecated BleakScanner.get_discovered_devices() async method.
  • Added capability to handle async functions as detection callbacks in BleakScanner.
  • Added error description in addition to error name when BleakDBusError is converted to string.
  • Change typing of data parameter in write methods to Union[bytes, bytearray, memoryview].
  • Improved type hints in CoreBluetooth backend.
  • Use delegate callbacks for get_rssi() on CoreBluetooth backend.
  • Use @objc.python_method where possible in PeripheralDelegate class.
  • Using ObjC key-value observer to wait for BleakScanner.start() and stop()
    in CoreBluetooth backend.

Fixed

hbldh and others added 30 commits March 18, 2021 10:09
Merge master back to develop
Handling of undetected devices in connect_by_bledevice example.
Correcting typehint in BleakScanner.find_device_by_address

Fixes #487.
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
dlech and others added 27 commits June 4, 2021 21:43
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.
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.
Fixed notification value should be bytearray on CoreBluetooth.
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.
CoreBluetooth scan start/stop improvements
Update changelog and version for release.
This should no longer be needed since 84af9f3.
@hbldh
Copy link
Owner

hbldh commented Jun 18, 2021

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...

@dlech dlech merged commit 9081411 into master Jun 19, 2021
@dlech dlech deleted the release/0.12.0 branch June 19, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants