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

Bump bleak and dbus-fast versions #89906

Closed
wants to merge 9 commits into from
Closed

Bump bleak and dbus-fast versions #89906

wants to merge 9 commits into from

Conversation

kiwiz
Copy link
Contributor

@kiwiz kiwiz commented Mar 18, 2023

Proposed change

Bumps dependencies:

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

It looks like Bluetooth-Devices/dbus-fast#189 and the related Bluetooth-Devices/dbus-fast#193 are already included (via the pinned v1.84.1). I've bumped that up to v1.84.2 because the change looks like a no-op.

A new version of bleak was recently released containing hbldh/bleak#1182, which will allow users to take advantage of a hardcoded UID.

Checklist

  • The code change is tested and works locally. [TODO]
  • Local tests pass. Your PR cannot be merged unless tests pass [TODO]
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations [TODO]
  • The code has been formatted using Black (black --fast homeassistant tests) [N/A?]
  • Tests have been added to verify that the new code works. [TODO]

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest. [TODO]
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc. [N/A]

To help with the load of incoming pull requests:

@home-assistant
Copy link

Hi @kiwiz

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration (bluetooth) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of bluetooth can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign bluetooth Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

Will check this tomorrow. We may need to make some adjustments other places in the eco system before doing this

@kiwiz
Copy link
Contributor Author

kiwiz commented Mar 18, 2023

👍 Let me know if I can help.

@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

Thanks for bumping the dependency! Please update the PR description to contain at least one (or multiple) of the following:

  • A link to the release notes of this package version, and all versions in between.
  • A link to the changelog of this package.
  • A link to a Git(Hub) diff/compare view from the current version to the bumped version.
    This allows us to review upstream changes, which is needed to decide this change is working as intended and/or if we can include it in, for example, a patch release of Home Assistant.

Thanks 👍

@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

Opened hbldh/bleak#1258

Might be an existing issue though. Too late here for me to dig in more

@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

I pushed some small fixes for signature and typing changes. Manual testing looks good.

There probably needs to be some mocking fixes in the CI as well as all the tests are failing

@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

rssi and details are now required args so I had to make a helper to generate BLEDevice objects like we do for AdvertisementData

@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

That signature change is going to cause issues

2023-03-18 09:26:20.247 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aioesphomeapi/client.py", line 260, in _on_stop
    await on_stop(expected_disconnect)
  File "/Users/bdraco/home-assistant/venv/lib/python3.10/site-packages/aioesphomeapi/reconnect_logic.py", line 92, in _on_disconnect
    await self._on_disconnect_cb()
  File "/Users/bdraco/home-assistant/homeassistant/components/esphome/__init__.py", line 345, in on_disconnect
    disconnect_cb()
  File "/Users/bdraco/home-assistant/homeassistant/components/esphome/bluetooth/client.py", line 221, in _async_esp_disconnected
    self._async_ble_device_disconnected()
  File "/Users/bdraco/home-assistant/homeassistant/components/esphome/bluetooth/client.py", line 210, in _async_ble_device_disconnected
    self._async_call_bleak_disconnected_callback()
  File "/Users/bdraco/home-assistant/homeassistant/components/esphome/bluetooth/client.py", line 226, in _async_call_bleak_disconnected_callback
    self._disconnected_callback()
TypeError: SwitchbotBaseDevice._disconnected() missing 1 required positional argument: 'client'

@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

hbldh/bleak@af12363

bdraco added a commit that referenced this pull request Mar 18, 2023
@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

This is getting big. I'm going to start a new PR

@bdraco bdraco mentioned this pull request Mar 18, 2023
20 tasks
@bdraco
Copy link
Member

bdraco commented Mar 18, 2023

I started #89925 since I'm going to need another reviewer since the work to support 0.20 is substantial. I also need to do test wheels so I have to push it to the main repo to do that.

Thanks @kiwiz for getting this started. We will get it updated!

@bdraco bdraco closed this Mar 18, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants