pysesameos2
pysesameos2 copied to clipboard
Update dependency bleak to ^0.22.0
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
bleak (changelog) | ^0.14.3 -> ^0.22.0 |
Release Notes
hbldh/bleak (bleak)
v0.22.3
======================
Changed
- Don't change ctypes' global state
bleak.backends.winrt.util
. - Improved performance of BlueZ backend when there are many adapters.
- Added support for Python 3.13.
v0.22.2
======================
Changed
- Retrieve the BLE address required by
BleakClientWinRT
from scan response if advertising is None (WinRT). - Changed type hint for
adv
attribute ofbleak.backends.winrt.scanner._RawAdvData
. -
BleakGATTCharacteristic.max_write_without_response_size
is now dynamic.
Fixed
- Fixed
discovered_devices_and_advertisement_data
returning devices that should be filtered out by service UUIDs. Fixes #1576. - Fixed a
Descriptor None was not found!
exception occurring instart_notify()
on Android. Fixes #823. - Fixed exception raised when starting
BleakScanner
while running in a Windows GUI app.
v0.22.1
======================
Added
- Added
bleak.backends.winrt.util.allow_sta()
method to allow integration with graphical user interfaces on Windows. Fixes #1565.
v0.22.0
======================
Added
- Added
BleakCharacteristicNotFoundError
which is raised if a device does not support a characteristic. - Added utility function to work around
pywin32
setting threading model to STA on Windows.
Changed
- Updated PyObjC dependency on macOS to v10.x.
- Updated missing Bluetooth SIG characteristics and service UUIDs.
- Updated
BlueZManager
to remove empty interfaces from_properties
during InterfacesRemoved message. - Updated PyWinRT dependency to v2. Fixes #1529.
- Raise exception when trying to scan while in a single-treaded apartment (STA) on Windows. Fixes #1132.
Fixed
- Fixed BlueZ version in passive scanning error message. Fixes #1433.
- Fixed mypy requiring
Unpack[ExtraArgs]
that were intended to be optional. Fixes #1487. - Fixed
KeyError
in BlueZis_connected()
andget_global_bluez_manager()
when device is not present. Fixes #1507. - Fixed BlueZ
_wait_removed
completion on invalid object path. Fixes #1489. - Fixed rare unhandled exception when scanning on macOS when using
use_bdaddr
. Fixes #1523. - Fixed scanning silently failing on Windows when Bluetooth is off. Fixes #1535.
- Fixed using wrong value for
tx_power
in Android backend. Fixes #1532. - Fixed 4-character UUIDs not working on
BleakClient.*_gatt_char
methods. Fixes #1498. - Fixed race condition with getting max PDU size on Windows. Fixes #1497. [REVERTED in v0.22.2]
- Fixed filtering advertisement data by service UUID when multiple apps are scanning. Fixes #1534.
v0.21.1
======================
Changed
- Changed
dbus-fast
dependency to include v2.x. Fixes #1412.
v0.21.0
======================
Added
- Added
bleak.uuids.normalize_uuid_16()
function. - Added
bleak.uuids.normalize_uuid_32()
function. - Added
advertisement_data()
async iterator method toBleakScanner
. Merged #1361. - Added type hints for kwargs on
BleakScanner
class methods. - Added support for Python 3.12.
Changed
- Improved error messages when failing to get services in WinRT backend.
- Improved error messages with enum values in WinRT backend. Fixes #1284.
- Scanner backends modified to allow multiple advertisement callbacks. Merged #1367.
- Changed default handling of the
response
argument inBleakClient.write_gatt_char
. Fixes #909. - Bleak recipe now automatically installs bleak from GitHub release in Kivy example.
- Changed
BlueZManager
methods to raiseBleakError
when device is not in BlueZ. - Optimized BlueZ backend device watchers and condition callbacks to avoid linear searches.
- Changed type hint for buffer protocol to
collections.abc.Buffer
.
Fixed
- Fixed handling all access denied errors when enumerating characteristics on Windows. Fixes #1291.
- Added support for 32bit UUIDs. Fixes #1314.
- Fixed typing for
BaseBleakScanner
detection callback. - Fixed possible crash in
_stopped_handler()
in WinRT backend. Fixes #1330. - Reduced expensive logging in the BlueZ backend. Merged #1376.
- Fixed race condition with
"InterfaceRemoved"
when getting services in BlueZ backend. - Fixed missing permissions and requirements in android Kivy example. Fixes #1184.
- Fixed WinRT backend sometimes hanging forever when a device goes out of range during connection. Fixes #1359.
Removed
Dropped support for Python 3.7.
v0.20.2
======================
Fixed
- Fixed
org.bluez.Error.InProgress
in characteristic and descriptor read and write methods in BlueZ backend. - Fixed
OSError: [WinError -2147483629] The object has been closed
when connecting on Windows. Fixes #1280.
v0.20.1
======================
Fixed
- Fixed possible garbage collection of running async callback from
BleakClient.start_notify()
. - Fixed possible garbage collection of running async callback from
BleakScanner(detection_callback=)
. - Fixed possible garbage collection of disconnect monitor in BlueZ backend. Fixed #1258.
v0.20.0
======================
Added
- Added
BLEAK_DBUS_AUTH_UID
environment variable for hardcoding D-Bus UID. Merged #1182. - Added return type
None
to some scanner methods. - Added optional hack to use Bluetooth address instead of UUID on macOS. Merged #1073.
- Added
BleakScanner.find_device_by_name()
class method. - Added optional command line argument to use debug log level to all applicable examples.
- Added
bleak.uuids.normalize_uuid_str()
function. - Added optional
services
argument toBleakClient()
to filter services. Merged #654. - Added automatic retry on
le-connection-abort-by-local
in BlueZ backend. Fixes #1220.
Changed
- Dropped
async-timeout
dependency on Python >= 3.11. - Deprecated
BLEDevice.rssi
andBLEDevice.metadata
. Fixes #1025. -
BLEDevice
now uses__slots__
to reduce memory usage. Merged #1117. -
BaseBleakClient.services
is nowNone
instead of empty service collection until services are discovered. - Include thread name in
BLEAK_LOGGING
output. Merged #1144. - Updated PyObjC dependency on macOS to v9.x.
Fixed
- Fixed invalid UTF-8 in
uuids.uuid16_dict
. - Fixed
AttributeError
in_ensure_success
in WinRT backend. - Fixed
BleakScanner.stop()
can raiseBleakDBusError
withorg.bluez.Error.NotReady
in BlueZ backend. - Fixed
BleakScanner.stop()
hanging in WinRT backend when Bluetooth is disabled. - Fixed leaking services when
get_services()
is cancelled in WinRT backend. - Fixed disconnect monitor task not always cancelled on the BlueZ client. Merged #1159.
- Fixed WinRT scanner never calling
detection_callback
when a device does not send a scan response. Fixes #1211. - Fixed
BLEDevice
name sometimes incorrectlyNone
. - Fixed unhandled exception in
CentralManagerDelegate
destructor on macOS. Fixes #1219. - Fixed object passed to
disconnected_callback
is notBleakClient
. Fixes #1200.
v0.19.5
======================
Fixed
- Fixed more issues with getting services in WinRT backend.
v0.19.4
======================
Fixed
- Fixed
TypeError
in WinRT backend introduced in v0.19.3.
v0.19.3
======================
Fixed
- Fixed
TimeoutError
when connecting to certain devices with WinRT backend. Fixes #604.
v0.19.2
======================
Fixed
- Fixed crash when getting services in WinRT backend in Python 3.11. Fixes #1112.
- Fixed cache mode when retrying get services in WinRT backend. Merged #1102.
- Fixed
KeyError
crash in BlueZ backend when removing non-existent property. Fixes #1107.
v0.19.1
======================
Fixed
- Fixed crash in Android backend introduced in v0.19.0. Fixes #1085.
- Fixed service discovery blocking forever if device disconnects in BlueZ backend. Merged #1092.
- Fixed
AttributeError
crash when scanning on Windows builds < 19041. Fixes #1094.
v0.19.0
======================
Added
- Added support for Python 3.11. Merged #990.
- Added better error message for Bluetooth not authorized on macOS. Merged #1033.
- Added
BleakDeviceNotFoundError
which should is raised if a device can not be found byconnect
,pair
andunpair
. Merged #1022. - Added
rssi
attribute toAdvertisementData
. Merged #1047. - Added
BleakScanner.discovered_devices_and_advertisement_data
property. Merged #1047. - Added
return_adv
argument toBleakScanner.discover
method. Merged #1047. - Added
BleakClient.unpair()
implementation for BlueZ backend. Merged #1067.
Changed
- Changed
AdvertisementData
to a named tuple. Merged #1047. - A faster
unpack_variants
is now provided by dbus-fast. Merged #1055.
Fixed
- On BlueZ, support creating additional instances running on a different event loops (i.e. multiple pytest-asyncio cases). Merged #1034.
- Fixed unhandled exception in
max_pdu_size_changed_handler
in WinRT backend. Fixes #1039. - Fixed stale services in WinRT backend causing
WinError -2147483629
. Fixes #1061.
Removed
Removed bleak.__version__
. Use importlib.metadata.version('bleak')
instead.
v0.18.1
======================
Fixed
- Reverted unintentional breaking parameter name changes. Fixes #1028.
v0.18.0
======================
Changed
- Relaxed
async-timeout
dependency version to support different installations. Merged #1009. -
BleakClient.unpair()
in WinRT backend can be called without being connected first. Merged #1012. - Use relative imports internally. Merged #1007.
-
BleakScanner
andBleakClient
are now concrete classes. Fixes #582. - Deprecated
BleakScanner.register_detection_callback()
. - Deprecated
BleakScanner.set_scanning_filter()
. - Deprecated
BleakClient.set_disconnected_callback()
. - Deprecated
BleakClient.get_services()
. - Refactored common code in
BleakClient.start_notify()
. - (BREAKING) Changed notification callback argument from
int
toBleakGattCharacteristic
. Fixes #759.
Fixed
- Fixed
tx_power
not included inAdvertisementData.__repr__
when 0. Merged #1017.
v0.17.0
======================
Added
-
AdvertisementData
class now has an attributetx_power
. Merged #987.
Changed
-
BleakClient
methods now raiseBleakError
if called when not connected in WinRT backend. Merged #973. - Extended disconnect timeout to 120 seconds in WinRT backend. Fixes #807.
- Changed version check for BlueZ battery workaround to exclude versions >= 5.55. Merged #976.
- Use Poetry for build system and dependencies. Merged #978.
- The BlueZ D-Bus backend implements a services cache between connections to significancy improve reconnect performance.
To use the cache, call
connect
andget_services
with thedangerous_use_bleak_cache
argument to avoid services being resolved again. Merged #923. - The BlueZ D-Bus backend now uses
dbus-fast
package instead ofdbus-next
which significantly improves performance. Merged #988. - The BlueZ D-Bus backend will not avoid trying to connect to devices that are already connected. Fixes #992.
- Updated logging to lazy version and replaced format by f-string for
BleakClientWinRT
. #1000. - Added deprecation warning to
discover()
method. Merged #1005. - BlueZ adapter is chosen dynamically if not provided, instead of using hardcoded "hci0". Fixes #513.
Fixed
- Fixed wrong error message for BlueZ "Operation failed with ATT error". Merged #975.
- Fixed possible
AttributeError
when enabling notifications for battery service in BlueZ backend. Merged #976. - Fixed use of wrong enum in unpair function of WinRT backend. Merged #986.
- Fixed inconsistent return types for
properties
anddescriptors
properties ofBleakGATTCharacteristic
. Merged #989. - Handle device being removed before
GetManagedObjects
returns in BlueZ backend. Fixes #996. - Fixed crash in
max_pdu_size_changed_handler
in WinRT backend. Fixes #998. - Fixes a race in the BlueZ D-Bus backend where the disconnect monitor would be removed before it could be awaited. Merged #999.
Removed
- Removed
BLEDeviceCoreBluetooth
type from CoreBluetooth backend. Merged #977.
v0.16.0
======================
Added
- Added
BleakGattCharacteristic.max_write_without_response_size
property. Fixes #738.
Fixed
- Fixed regression in v0.15 where devices removed from BlueZ while scanning
were still listed in
BleakScanner.discovered_devices
. Fixes #942. - Fixed possible bad connection state in BlueZ backend. Fixes #951.
Changed
- Made BlueZ D-Bus signal callback logging lazy to improve performance. Merged #912.
- Switch to using
async_timeout
instead ofasyncio.wait_for for performance
. Merged #916. - Improved performance of
BlueZManager.get_services()
. Fixes #927.
Removed
- Removed explicit inheritance from object in class declarations. Merged #922.
- Removed first seen filter in
BleakScanner
detection callbacks on BlueZ backend. Merged #964.
v0.15.1
======================
Fixed
- The global BlueZ manager now disconnects correctly on exception. Merged #918.
- Handle the race in the BlueZ D-Bus backend where the device disconnects during
the connection process which presented as
Failed to cancel connection
. Merged #919. - Ensure the BlueZ D-Bus scanner can reconnect after DBus disconnection. Merged #920.
- Adjust default timeout for
read_gatt_char()
with CoreBluetooth to 20s. Fixes #926.
v0.15.0
======================
Added
- Added new
assigned_numbers
module andAdvertisementDataType
enum. - Added new
bluez
kwarg toBleakScanner
in BlueZ backend. - Added support for passive scanning in the BlueZ backend. Fixes #606.
- Added option to use cached services, characteristics and descriptors in WinRT backend. Fixes #686.
- Added
PendingDeprecationWarning
to use ofaddress_type
as keyword argument. It will be moved into thewinrt
keyword instead according to #623. - Added better error message when adapter is not present in BlueZ backend. Fixes #889.
Changed
- Add
py.typed
file so mypy discovers Bleak's type annotations. - UUID descriptions updated to 2022-03-16 assigned numbers document.
- Replace use of deprecated
asyncio.get_event_loop()
in Android backend. - Adjust default timeout for
read_gatt_char()
with CoreBluetooth to 10s. Merged #891. -
BleakScanner()
argsdetection_callback
andservice_uuids
are no longer keyword-only. -
BleakScanner()
argscanning_mode
is no longer Windows-only and is no longer keyword-only. - All
BleakScanner()
instances in BlueZ backend now use common D-Bus object manager. - Deprecated
filters
kwarg inBleakScanner
in BlueZ backend. - BlueZ version is now checked on first connection instead of import to avoid import side effects. Merged #907.
Fixed
- Documentation fixes.
- On empty characteristic description from WinRT, use the lookup table instead of returning empty string.
- Fixed detection of first advertisement in BlueZ backend. Merged #903.
- Fixed performance issues in BlueZ backend caused by calling "GetManagedObjects" each time a
BleakScanner
scans orBleakClient
is connected. Fixes #500. - Fixed not handling "InterfacesRemoved" in
BleakClient
in BlueZ backend. Fixes #882. - Fixed leaking D-Bus socket file descriptors in BlueZ backend. Fixes #805.
Removed
- Removed fallback to call "ConnectDevice" when "Connect" fails in Bluez backend. Fixes #806.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.79%. Comparing base (
0181b40
) to head (32af711
). Report is 3 commits behind head on main.
:exclamation: Current head 32af711 differs from pull request most recent head 3bfeac6. Consider uploading reports for the commit 3bfeac6 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #61 +/- ##
==========================================
- Coverage 93.95% 93.79% -0.16%
==========================================
Files 8 8
Lines 1141 1144 +3
==========================================
+ Hits 1072 1073 +1
- Misses 69 71 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I am receiving "Invalid request parameters" errors from Codecov and have no idea how to fix it.
Just created a new post at Community Board of Codecov: Error uploading due to 400 Invalid request parameters
(fingers crossed)