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
[fix] add missing tomli to the requirements.txt
Markus Heisere08ff05fffe0
diff --git a/requirements.txt b/requirements.txtindex c5cc3fcc9..7b90ffe3f 100644--- a/requirements.txt+++ b/requirements.txt@@ -15,7 +15,7 @@ setproctitle==1.3.3redis==5.0.8markdown-it-py==3.0.0fasttext-predict==0.9.2.2-pytomlpp==1.0.13; python_version < '3.11'+tomli==2.0.2; python_version < '3.11'pydantic==2.9.2eval_type_backport; python_version < '3.9'typer-slim==0.12.5diff --git a/searx/botdetection/config.py b/searx/botdetection/config.pyindex 147104205..2a982ba64 100644--- a/searx/botdetection/config.py+++ b/searx/botdetection/config.py@@ -14,17 +14,7 @@ import typingimport loggingimport pathlib-try:- import tomllib-- pytomlpp = None- USE_TOMLLIB = True-except ImportError:- import pytomlpp-- tomllib = None- USE_TOMLLIB = False-+from ..compat import tomllib__all__ = ['Config', 'UNSET', 'SchemaIssue']@@ -183,19 +173,10 @@ class Config:def toml_load(file_name):- if USE_TOMLLIB:- # Python >= 3.11- try:- with open(file_name, "rb") as f:- return tomllib.load(f)- except tomllib.TOMLDecodeError as exc:- msg = str(exc).replace('\t', '').replace('\n', ' ')- log.error("%s: %s", file_name, msg)- raise- # fallback to pytomlpp for Python < 3.11try:- return pytomlpp.load(file_name)- except pytomlpp.DecodeError as exc:+ with open(file_name, "rb") as f:+ return tomllib.load(f)+ except tomllib.TOMLDecodeError as exc:msg = str(exc).replace('\t', '').replace('\n', ' ')log.error("%s: %s", file_name, msg)raise