From 8fdc59a7604cd661638586ff0381530da86eb76c Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 7 Oct 2025 15:02:26 +0200 Subject: [fix:py3.14] Struct fields aren't discovered in Python 3.14 This is a temporary workaround for #5284 [1]. However, the problem must be solved at a different level, in msgspec [2]. [1] https://github.com/searxng/searxng/issues/5284 [2] https://github.com/jcrist/msgspec/issues/847 Signed-off-by: Markus Heiser --- searx/favicons/cache.py | 4 ++++ searx/favicons/config.py | 3 +++ searx/favicons/proxy.py | 3 +++ 3 files changed, 10 insertions(+) (limited to 'searx/favicons') diff --git a/searx/favicons/cache.py b/searx/favicons/cache.py index f623ac3a7..d724e086c 100644 --- a/searx/favicons/cache.py +++ b/searx/favicons/cache.py @@ -17,6 +17,10 @@ """ +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations + import typing as t import os diff --git a/searx/favicons/config.py b/searx/favicons/config.py index c22e1f3f0..217fce049 100644 --- a/searx/favicons/config.py +++ b/searx/favicons/config.py @@ -1,6 +1,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations import pathlib import msgspec diff --git a/searx/favicons/proxy.py b/searx/favicons/proxy.py index 1346d19b0..6a0867458 100644 --- a/searx/favicons/proxy.py +++ b/searx/favicons/proxy.py @@ -1,6 +1,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later """Implementations for a favicon proxy""" +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations from typing import Callable -- cgit v1.2.3