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:
Martin Weinelt 2026-07-05 12:28:05 +02:00
commit ad687d5638
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 25 additions and 0 deletions

View file

@ -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))

View file

@ -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