You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-text/calibre/files/calibre-5.44.0-Fix-compatib...

27 lines
1.0 KiB

From 5d8d85c649b181747d182f676cfd76f843bd61f0 Mon Sep 17 00:00:00 2001
From: Kovid Goyal <kovid@kovidgoyal.net>
Date: Sun, 1 Oct 2023 15:08:59 +0530
Subject: [PATCH] Fix compatibility with zeroconf >= 0.73
Fixes #2038 (fix compatibility with newer zeroconf)
---
src/calibre/devices/smart_device_app/driver.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py
index 87608f305b..b41c3a0063 100644
--- a/src/calibre/devices/smart_device_app/driver.py
+++ b/src/calibre/devices/smart_device_app/driver.py
@@ -2175,6 +2175,8 @@ def monkeypatch_zeroconf():
# "monkeypatch" zeroconf with a function without the check
try:
from zeroconf._utils.name import service_type_name
+ # zeroconf 0.73 uses an lru cache so we need __wrapped__
+ service_type_name = getattr(service_type_name, '__wrapped__', service_type_name)
service_type_name.__kwdefaults__['strict'] = False
except ImportError:
import zeroconf
--
2.41.0