mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.bleak-esphome: fix bluetooth-adapters compat
They made BluetoothAdapters an abstract class and bleak-esphome didn't get the memo yet.
This commit is contained in:
parent
b1f5afb266
commit
ad687d5638
2 changed files with 25 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||
index 55defbe..551d19e 100644
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -9,7 +9,7 @@ from aioesphomeapi import (
|
||||
ReconnectLogic,
|
||||
)
|
||||
from bleak_retry_connector import BleakSlotManager
|
||||
-from bluetooth_adapters import BluetoothAdapters
|
||||
+from bluetooth_adapters import get_adapters
|
||||
from habluetooth import (
|
||||
BluetoothManager,
|
||||
set_manager,
|
||||
@@ -20,7 +20,7 @@ from zeroconf import Zeroconf
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def manager():
|
||||
slot_manager = BleakSlotManager()
|
||||
- bluetooth_adapters = BluetoothAdapters()
|
||||
+ bluetooth_adapters = get_adapters()
|
||||
set_manager(BluetoothManager(bluetooth_adapters, slot_manager))
|
||||
|
||||
|
|
@ -29,6 +29,10 @@ buildPythonPackage (finalAttrs: {
|
|||
hash = "sha256-S4tYL/fq7wMjq81WRftZ1A+RVxs7kGpaM/TfVBNBgaI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./bluetooth-adapters-2.4.0-compat.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "setuptools>=75.8.2" setuptools
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue