diff --git a/searx/cache.py b/searx/cache.py index ea58c9328..062f34768 100644 --- a/searx/cache.py +++ b/searx/cache.py @@ -5,6 +5,10 @@ ---- """ +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations + __all__ = ["ExpireCacheCfg", "ExpireCacheStats", "ExpireCache", "ExpireCacheSQLite"] import abc 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 diff --git a/searx/result_types/_base.py b/searx/result_types/_base.py index b3f2afdeb..e97894b75 100644 --- a/searx/result_types/_base.py +++ b/searx/result_types/_base.py @@ -16,6 +16,10 @@ :members: """ +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations + __all__ = ["Result"] import typing as t diff --git a/searx/result_types/answer.py b/searx/result_types/answer.py index 1a24f12f1..d6c28001d 100644 --- a/searx/result_types/answer.py +++ b/searx/result_types/answer.py @@ -28,6 +28,9 @@ template. """ # pylint: disable=too-few-public-methods +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations __all__ = ["AnswerSet", "Answer", "Translations", "WeatherAnswer"] diff --git a/searx/result_types/code.py b/searx/result_types/code.py index fe69bf691..d6cd84724 100644 --- a/searx/result_types/code.py +++ b/searx/result_types/code.py @@ -14,6 +14,8 @@ template. For highlighting the code passages, Pygments_ is used. """ # pylint: disable=too-few-public-methods, disable=invalid-name +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 from __future__ import annotations __all__ = ["Code"] diff --git a/searx/result_types/keyvalue.py b/searx/result_types/keyvalue.py index 33718e7c2..d68318da6 100644 --- a/searx/result_types/keyvalue.py +++ b/searx/result_types/keyvalue.py @@ -13,6 +13,9 @@ template. """ # pylint: disable=too-few-public-methods +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations __all__ = ["KeyValue"] diff --git a/searx/result_types/paper.py b/searx/result_types/paper.py index 33bb5f99a..dd23a72d2 100644 --- a/searx/result_types/paper.py +++ b/searx/result_types/paper.py @@ -21,6 +21,8 @@ Related topics: """ # pylint: disable=too-few-public-methods, disable=invalid-name +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 from __future__ import annotations __all__ = ["Paper"] diff --git a/searx/weather.py b/searx/weather.py index 30b5bfeee..449b261ae 100644 --- a/searx/weather.py +++ b/searx/weather.py @@ -2,6 +2,10 @@ """Implementations used for weather conditions and forecast.""" # pylint: disable=too-few-public-methods +# Struct fields aren't discovered in Python 3.14 +# - https://github.com/searxng/searxng/issues/5284 +from __future__ import annotations + __all__ = [ "symbol_url", "Temperature",