claranet4 icon indicating copy to clipboard operation
claranet4 copied to clipboard

Deprecation warning from Bleak on BLEDevice.rssi

Open cdzombak opened this issue 1 year ago • 3 comments

When using claranet4 0.2.0, Bleak prints the following warning:

claranet4/lib.py:52: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead

cdzombak avatar Jun 28 '24 14:06 cdzombak

Thanks for raising. I have noticed this, but found the AdvertisementData API a bit confusing. I should look into it again.

On Fri, 28 Jun 2024 at 15:01, Chris Dzombak @.***> wrote:

When using claranet4 0.2.0, Bleak prints the following warning:

claranet4/lib.py:52: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead

— Reply to this email directly, view it on GitHub https://github.com/bede/claranet4/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHWAAFMDMLO3WODFUNUZ7DZJVUEVAVCNFSM6AAAAABKB63YYCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DANJRGMZDMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

bede avatar Jun 28 '24 14:06 bede

Thank you! It's not at all urgent.

In the meantime, for people using claranet4 as a library, it's possible to bring this warning into the standard library's logging system, and you can then silence it or do as you please:

logging.captureWarnings(True)

cdzombak avatar Jun 28 '24 16:06 cdzombak

Thanks for the tip! And again for raising.

I'm planning to add the ability to query more than one fields at a time as a string, which would be useful with xbar (MacOS menu bar integration)

On Fri, 28 Jun 2024 at 18:00, Chris Dzombak @.***> wrote:

Thank you! It's not at all urgent.

In the meantime, for people using claranet4 as a library, it's possible to bring this warning into the standard library's logging system, and you can then silence it or do as you please:

logging.captureWarnings(True)

— Reply to this email directly, view it on GitHub https://github.com/bede/claranet4/issues/2#issuecomment-2197322645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHWAADKHLEW3BUEDTFV4Z3ZJWJB5AVCNFSM6AAAAABKB63YYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGMZDENRUGU . You are receiving this because you commented.Message ID: @.***>

bede avatar Jun 29 '24 09:06 bede

Installing claranet4 on python 3.13.5 resulted in this error thrown:

AttributeError: 'BLEDevice' object has no attribute 'rssi'

arggh avatar Oct 11 '25 13:10 arggh

Thanks for reporting, It's been a while since I installed this afresh, let me take a look.

bede avatar Oct 11 '25 15:10 bede