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

get_discovered_devices() is not actually async #489

Closed
dlech opened this issue Mar 18, 2021 · 1 comment · Fixed by #495
Closed

get_discovered_devices() is not actually async #489

dlech opened this issue Mar 18, 2021 · 1 comment · Fixed by #495
Assignees
Labels
Opinions Appreciated Please add an opinion on your desired resolution on this issue!

Comments

@dlech
Copy link
Collaborator

dlech commented Mar 18, 2021

Technically speaking, BleakScanner.get_disovered_devices() does not need to be async since none of the implementations await anything.

However, changing it would be a major breaking change. We could probably lessen the impact by doing something similar to bc6da1e to make it not quite so breaking if we decide it is worth making the change (for some time, it would return an object that is both a list and a future that gives a warning about the change).

@dlech dlech added the Opinions Appreciated Please add an opinion on your desired resolution on this issue! label Mar 18, 2021
@hbldh
Copy link
Owner

hbldh commented Mar 23, 2021

Yes, I agree. It absolutely does not need to be async. It should be changed. Apply the same warning procedure and let's try to get it properly changed in a future release.

@dlech dlech self-assigned this Mar 23, 2021
dlech added a commit that referenced this issue Mar 28, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Opinions Appreciated Please add an opinion on your desired resolution on this issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants