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

Update dependency bleak to ^0.22.0 #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jul 29, 2022

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
bleak (changelog) ^0.14.3 -> ^0.22.0 age adoption passing confidence

Release Notes

hbldh/bleak (bleak)

v0.22.3

Compare Source

======================

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

Compare Source

======================

Changed

  • Retrieve the BLE address required by BleakClientWinRT from scan response if advertising is None (WinRT).
  • Changed type hint for adv attribute of bleak.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 in start_notify() on Android. Fixes #​823.
  • Fixed exception raised when starting BleakScanner while running in a Windows GUI app.

v0.22.1

Compare Source

======================

Added

  • Added bleak.backends.winrt.util.allow_sta() method to allow integration
    with graphical user interfaces on Windows. Fixes #​1565.

v0.22.0

Compare Source

======================

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 BlueZ is_connected() and get_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

Compare Source

======================

Changed

  • Changed dbus-fast dependency to include v2.x. Fixes #​1412.

v0.21.0

Compare Source

======================

Added

  • Added bleak.uuids.normalize_uuid_16() function.
  • Added bleak.uuids.normalize_uuid_32() function.
  • Added advertisement_data() async iterator method to BleakScanner. 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 in BleakClient.write_gatt_char.
    Fixes #​909.
  • Bleak recipe now automatically installs bleak from GitHub release in Kivy example.
  • Changed BlueZManager methods to raise BleakError 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

Compare Source

======================

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

Compare Source

======================

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

Compare Source

======================

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 to BleakClient() 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 and BLEDevice.metadata. Fixes #​1025.
  • BLEDevice now uses __slots__ to reduce memory usage. Merged #​1117.
  • BaseBleakClient.services is now None 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 raise BleakDBusError with org.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 incorrectly None.
  • Fixed unhandled exception in CentralManagerDelegate destructor on macOS. Fixes #​1219.
  • Fixed object passed to disconnected_callback is not BleakClient. Fixes #​1200.

v0.19.5

Compare Source

======================

Fixed

  • Fixed more issues with getting services in WinRT backend.

v0.19.4

Compare Source

======================

Fixed

  • Fixed TypeError in WinRT backend introduced in v0.19.3.

v0.19.3

Compare Source

======================

Fixed

  • Fixed TimeoutError when connecting to certain devices with WinRT backend. Fixes #​604.

v0.19.2

Compare Source

======================

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

Compare Source

======================

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

Compare Source

======================

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 by connect, pair and unpair. Merged #​1022.
  • Added rssi attribute to AdvertisementData. Merged #​1047.
  • Added BleakScanner.discovered_devices_and_advertisement_data property. Merged #​1047.
  • Added return_adv argument to BleakScanner.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

Compare Source

======================

Fixed

  • Reverted unintentional breaking parameter name changes. Fixes #​1028.

v0.18.0

Compare Source

======================

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 and BleakClient 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 to BleakGattCharacteristic. Fixes #​759.

Fixed

  • Fixed tx_power not included in AdvertisementData.__repr__ when 0. Merged #​1017.

v0.17.0

Compare Source

======================

Added

  • AdvertisementData class now has an attribute tx_power. Merged #​987.

Changed

  • BleakClient methods now raise BleakError 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 and get_services with the dangerous_use_bleak_cache
    argument to avoid services being resolved again. Merged #​923.
  • The BlueZ D-Bus backend now uses dbus-fast package instead of dbus-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 and descriptors properties of BleakGATTCharacteristic. 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

Compare Source

======================

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

Compare Source

======================

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

Compare Source

======================

Added

  • Added new assigned_numbers module and AdvertisementDataType enum.
  • Added new bluez kwarg to BleakScanner 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 of address_type as keyword argument. It will be moved into the
    winrt 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() args detection_callback and service_uuids are no longer keyword-only.
  • BleakScanner() arg scanning_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 in BleakScanner 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 or BleakClient 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
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.79%. Comparing base (0181b40) to head (32af711).
Report is 3 commits behind head on main.

❗ 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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot force-pushed the renovate/bleak-0.x branch 2 times, most recently from ac101a5 to e3c143b Compare August 1, 2022 08:53
@mochipon
Copy link
Owner

mochipon commented Aug 1, 2022

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)

@renovate renovate bot force-pushed the renovate/bleak-0.x branch from e3c143b to 61e5e57 Compare August 1, 2022 19:09
@renovate renovate bot force-pushed the renovate/bleak-0.x branch from 61e5e57 to 5370d46 Compare August 31, 2022 23:38
@renovate renovate bot changed the title Update dependency bleak to ^0.15.0 Update dependency bleak to ^0.16.0 Aug 31, 2022
@renovate renovate bot changed the title Update dependency bleak to ^0.16.0 Update dependency bleak to ^0.17.0 Sep 12, 2022
@renovate renovate bot force-pushed the renovate/bleak-0.x branch from 5370d46 to b8e6f5c Compare September 12, 2022 21:39
@renovate renovate bot changed the title Update dependency bleak to ^0.17.0 Update dependency bleak to ^0.18.0 Sep 23, 2022
@renovate renovate bot force-pushed the renovate/bleak-0.x branch from b8e6f5c to f7e5b04 Compare September 23, 2022 19:59
@renovate renovate bot force-pushed the renovate/bleak-0.x branch from f7e5b04 to 2ae7430 Compare November 20, 2022 20:21
@renovate renovate bot changed the title Update dependency bleak to ^0.18.0 Update dependency bleak to ^0.19.0 Nov 20, 2022
@renovate renovate bot changed the title Update dependency bleak to ^0.19.0 Update dependency bleak to ^0.20.0 Mar 22, 2023
@renovate renovate bot force-pushed the renovate/bleak-0.x branch from 2ae7430 to 4d7f030 Compare March 22, 2023 21:41
@renovate renovate bot force-pushed the renovate/bleak-0.x branch from 4d7f030 to 78385fb Compare September 2, 2023 23:08
@renovate renovate bot changed the title Update dependency bleak to ^0.20.0 Update dependency bleak to ^0.21.0 Sep 2, 2023
@renovate renovate bot force-pushed the renovate/bleak-0.x branch from 78385fb to 3bfeac6 Compare May 4, 2024 19:26
@renovate renovate bot changed the title Update dependency bleak to ^0.21.0 Update dependency bleak to ^0.22.0 May 4, 2024
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.

1 participant