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

Release/0.22.0 #1562

Merged
merged 40 commits into from
May 4, 2024
Merged

Release/0.22.0 #1562

merged 40 commits into from
May 4, 2024

Conversation

dlech
Copy link
Collaborator

@dlech dlech commented May 4, 2024

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

Fixed

daveisfera and others added 30 commits September 26, 2023 13:39
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.12 to 1.26.17.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.12...1.26.17)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Apperently the feature changed between 5.55 and 5.56 so >= 5.56 is requrired.

Fixes #1433.
It's not uncommon for devices to change its set of supported characteristics, for example during an initial setup.
Without a specialized exception class it's tricky to detect when this happens.
BlueZ changed their docs from txt to rst so update the links accordingly.
This change was made automatically by VS Code since `true` has been
deprecated.
Fill in some missing type hints.
* Fix _wait_removed completion on invalid object path

The _wait_removed method registers the "InterfacesRemoved" callback on
the adapter path of the device without checking which object was
removed when called.
This means that any removed interface while a connection is
being established can cause the _wait_removed to complete and cancel
the connection.

This commit simply checks that the callback is for the proper device
object path.

Fixes #1489
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](pallets/jinja@3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.17 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.17...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [idna](https://github.com/kjd/idna) from 3.3 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](kjd/idna@v3.3...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [black](https://github.com/psf/black) from 22.8.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@22.8.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
black v24 triggers this error
It is not safe to start the scanner if it is already running. This adds
a check to ensure that the scanner is not already running before starting.
It will not raise an exception instead of resulting in undefined behavior.
If Bluetooth is off or not present, the status will be ABORTED. We can
use this to give a helpful error message.

Also wait some time for the status to change to STARTED before returning.

Fixes: #1535
This was using the advertisement received signal strength indicator
instead of the transmitted power level. This is now fixed.

Fixes: #1532
dlech and others added 10 commits April 28, 2024 19:42
- Add isort to pyproject.toml
- Format code using isort
- Add isort to CI lint checks
This fixes 4-character UUIDs causing BleakCharacteristicNotFoundError
instead of being properly resolved.

Fixes: #1498
Users have reported that the max pdu size was wrong on some devices.
This was happening because the max_pdu_size_changed event was happeing
after the get_services() call returned.

This adds an event to wait for the max_pdu_size_changed event to happen
and updates the characteristics in the service dictionary after the
fact to ensure they have the correct value.

The service_explorer example is also updated to show the value to help
with future troubleshooting.

Fixes: #1497
This updates to the stable release of winrt, which is now 2.0.1. This
has the side effect of fixing import errors on systems where the
required Visual C++ redistributable is not installed.

Fixes: #1529
The pywin32-related packages will implicitly set the threading model to
STA when imported. Since Bleak is using WinRT for async methods and we
don't have a Windows event loop running, we need to let users know that
Bleak is not going to work in this case.

Also add a utility function and troubleshooting docs to provide a
workaround for this issue.

Fixes: #1132
Bug fix releases don't get new features so we don't need trailing .0.
It was noted that on Linux, if another app was scanning at the same
time, BlueZ would trigger RSSI changes for all devices, even if they
they didn't match the service_uuids filter.

This change ensures that we always filter by service_uuids, even if
the OS isn't doing it for us.

On Windows, the OS wasn't filtering for us anyway, so we can just move
that code to the shared call_detection_callbacks() so that all backends
will make use of it.

Fixes: #1534
@dlech dlech merged commit 93d88e0 into master May 4, 2024
15 checks passed
@dlech dlech deleted the release/0.22.0 branch May 4, 2024 18:02
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.

9 participants