python3Packages.smpclient: fix bleak 1.0.0 compat

This commit is contained in:
Martin Weinelt
2025-08-08 03:30:46 +02:00
parent bc07f2d847
commit 13aa6a7f59
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
diff --git a/tests/test_smp_ble_transport.py b/tests/test_smp_ble_transport.py
index 95a7ade..f469438 100644
--- a/tests/test_smp_ble_transport.py
+++ b/tests/test_smp_ble_transport.py
@@ -73,11 +73,11 @@ def test_SMP_gatt_consts() -> None:
@patch(
"smpclient.transport.ble.BleakScanner.find_device_by_address",
- return_value=BLEDevice("address", "name", None, -60),
+ return_value=BLEDevice("address", "name", None),
)
@patch(
"smpclient.transport.ble.BleakScanner.find_device_by_name",
- return_value=BLEDevice("address", "name", None, -60),
+ return_value=BLEDevice("address", "name", None),
)
@patch("smpclient.transport.ble.BleakClient", new=MockBleakClient)
@pytest.mark.asyncio

View File

@@ -25,7 +25,10 @@ buildPythonPackage rec {
hash = "sha256-NQRVEvi/B+KdhPIzw8pm22uXpYPkoaatkCNFnEcibzo=";
};
pythonRelaxDeps = [ "smp" ];
pythonRelaxDeps = [
"bleak"
"smp"
];
build-system = [
poetry-core
@@ -45,6 +48,8 @@ buildPythonPackage rec {
pytestCheckHook
];
patches = [ ./bleak-compat.patch ];
pythonImportsCheck = [ "smpclient" ];
meta = {