Future warning emitted from zeroconf, missing update_service method
Minimal test code:
import leglight
lights = leglight.discover(5)
Diagnostic:
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/zeroconf/_services/browser.py:169: FutureWarning: <leglight.discovery.discover.<locals>.thelistener object at 0x105e6c130> has no update_service method. Provide one (it can be empty if you don't care about the updates), it'll become mandatory.
Versions:
Darwin matsu.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64
pyleglight git commit: 96e89334801d068c631f2a1fe39824fa1532f211
Python 3.10.0:b494f5935c
zeroconf versions: 0.36.7
Proposed patch:
diff --git a/leglight/discovery.py b/leglight/discovery.py index 3308c35..a7b3106 100644 --- a/leglight/discovery.py +++ b/leglight/discovery.py @@ -34,6 +34,9 @@ def discover(timeout: int = 5) -> list: logging.debug("Found light @ {}:{}".format(ip, port)) lights.append(LegLight(address=ip, port=port, name=lname, server=server))
-
def update_Service(self, zeroconf):