github hbldh/bleak v3.1.0

one hour ago

Added

  • Added BleakAdapter class with get_connected_devices() to retrieve BLE devices that are already connected to the system without scanning.
  • Added new Android backend for apps built with BeeWare/Briefcase (Chaquopy). Requires Python 3.13 or later.

Changed

  • Changed minimum dbus-fast version to 4.0.0 on Linux.

Fixed

  • Fixed deprecated adapter keyword argument mutating shared defaults and caller-provided bluez arguments in BleakScanner and BleakClient. Fixes #2028.
  • Fixed handling empty notification payloads in BlueZ backend when using "AcquireNotify". Fixes #1982.
  • Fixed memory leaks when scanning and using a notification discriminator in CoreBluetooth backend.
  • Fixed BleakClient being kept alive by the CentralManagerDelegate after a failed connection attempt in CoreBluetooth backend.
  • Fixed leaking Bluetooth address data when scanning with cb={"use_bdaddr": True} in CoreBluetooth backend.
  • Fixed crash in WinRT backend if a WinRT event handler is called after the asyncio event loop is closed.
  • Fixed device removed callbacks in BlueZ backend matching devices on adapters whose name starts with the watched adapter name, e.g. hci10 for hci1.
  • Fixed BlueZ backend not detecting loss of the D-Bus connection, which left clients reporting connected forever and disconnect callbacks never firing.
  • Fixed disconnect() raising EOFError and leaking the D-Bus connection in BlueZ backend when the message bus died.
  • Fixed disconnect() leaking the D-Bus connection in BlueZ backend when it raised or was canceled.
  • Fixed start_notify() raising ValueError after reconnecting in CoreBluetooth backend. Fixes #1969.
  • Fixed GATT operations raising OSError instead of BleakError in WinRT backend when the device disconnects during the operation.
  • Fixed intermittent AssertionError in WinRT backend on fast reconnect.
  • Fixed BlueZ backend to attempt to automatically recover from InProgress error when stopping scanning. Fixes #2021.

Don't miss a new bleak release

NewReleases is sending notifications on new releases.