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

FutureWarning: BLEDevice.rssi is deprecated ... from Bleak v 0.20.0 #83

Closed
zalexua opened this issue Apr 28, 2023 · 1 comment
Closed

Comments

@zalexua
Copy link

zalexua commented Apr 28, 2023

ble-serial v 2.7.0 has been installed with automatic dependency bleak v 0.20.2 which causes an issue:

# ble-scan
Started general BLE scan

/usr/local/lib/python3.10/dist-packages/ble_serial/scan/main.py:34: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead
  sorted_devices = sorted(devices, key=lambda dev: dev.rssi, reverse=True)
/usr/local/lib/python3.10/dist-packages/ble_serial/scan/main.py:37: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead
  print(f'{d.address} (RSSI={d.rssi}): {d.name}')
98:DA:E0:01:9C:46 (RSSI=-46): ANT-DISPLAY
54:51:75:A2:8E:51 (RSSI=-60): S1B_BLE

Finished general BLE scan

The issue is not reproduced on Bleak v 0.19.5

# pip install bleak==0.19.5
Collecting bleak==0.19.5
  Using cached bleak-0.19.5-py3-none-any.whl (132 kB)
Requirement already satisfied: dbus-fast<2.0.0,>=1.22.0 in /usr/local/lib/python3.10/dist-packages (from bleak==0.19.5) (1.85.0)
Requirement already satisfied: async-timeout<5,>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from bleak==0.19.5) (4.0.2)
Installing collected packages: bleak
  Attempting uninstall: bleak
    Found existing installation: bleak 0.20.0
    Uninstalling bleak-0.20.0:
      Successfully uninstalled bleak-0.20.0
Successfully installed bleak-0.19.5
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

# ble-scan
Started general BLE scan

98:DA:E0:01:9C:46 (RSSI=-46): ANT-DISPLAY
54:51:75:A2:8E:51 (RSSI=-56): S1B_BLE

Finished general BLE scan

and reproduced with next release - v 0.20.0

@Jakeler
Copy link
Owner

Jakeler commented May 13, 2023

Thanks for reporting, fixed in v2.7.1.

@Jakeler Jakeler closed this as completed May 13, 2023
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

No branches or pull requests

2 participants