SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
Drop typing-extensions dependency (#3265)
Alexandre Flament38fdd2288a8c
diff --git a/requirements.txt b/requirements.txtindex 78b7d1142..80f0bdb47 100644--- a/requirements.txt+++ b/requirements.txt@@ -14,6 +14,5 @@ httpx-socks[asyncio]==0.7.7setproctitle==1.3.3redis==5.0.2markdown-it-py==3.0.0-typing_extensions==4.9.0fasttext-predict==0.9.2.2pytomlpp==1.0.13diff --git a/searx/enginelib/traits.py b/searx/enginelib/traits.pyindex 6402fde22..e1a5df79a 100644--- a/searx/enginelib/traits.py+++ b/searx/enginelib/traits.py@@ -14,8 +14,7 @@ from __future__ import annotationsimport jsonimport dataclassesimport types-from typing import Dict, Iterable, Union, Callable, Optional, TYPE_CHECKING-from typing_extensions import Literal, Self+from typing import Dict, Literal, Iterable, Union, Callable, Optional, TYPE_CHECKINGfrom searx import localesfrom searx.data import data_dir, ENGINE_TRAITS@@ -136,7 +135,7 @@ class EngineTraits:return EngineTraits(**dataclasses.asdict(self))@classmethod- def fetch_traits(cls, engine: Engine) -> Union[Self, None]:+ def fetch_traits(cls, engine: Engine) -> Union['EngineTraits', None]:"""Call a function ``fetch_traits(engine_traits)`` from engines namespace to fetchand set properties from the origin engine in the object ``engine_traits``. Iffunction does not exists, ``None`` is returned.@@ -204,7 +203,7 @@ class EngineTraitsMap(Dict[str, EngineTraits]):json.dump(self, f, indent=2, sort_keys=True, cls=EngineTraitsEncoder)@classmethod- def from_data(cls) -> Self:+ def from_data(cls) -> 'EngineTraitsMap':"""Instantiate :class:`EngineTraitsMap` object from :py:obj:`ENGINE_TRAITS`"""obj = cls()for k, v in ENGINE_TRAITS.items():@@ -212,7 +211,7 @@ class EngineTraitsMap(Dict[str, EngineTraits]):return obj@classmethod- def fetch_traits(cls, log: Callable) -> Self:+ def fetch_traits(cls, log: Callable) -> 'EngineTraitsMap':from searx import engines # pylint: disable=cyclic-import, import-outside-toplevelnames = list(engines.engines)diff --git a/searx/search/checker/background.py b/searx/search/checker/background.pyindex aec2a1790..f16e4c25c 100644--- a/searx/search/checker/background.py+++ b/searx/search/checker/background.py@@ -8,8 +8,7 @@ import timeimport threadingimport osimport signal-from typing import Dict, Union, List, Any, Tuple, Optional-from typing_extensions import TypedDict, Literal+from typing import Any, Dict, List, Literal, Optional, Tuple, TypedDict, Unionimport redis.exceptions