python3Packages.smpclient: fix bleak 1.0.0 compat
This commit is contained in:
18
pkgs/development/python-modules/smpclient/bleak-compat.patch
Normal file
18
pkgs/development/python-modules/smpclient/bleak-compat.patch
Normal 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
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user