diff --git a/requirements-dev.txt b/requirements-dev.txt index 326c5fdb5..348b55b3a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,16 +6,14 @@ pylint==4.0.5 splinter==0.21.0 selenium==4.41.0 Pallets-Sphinx-Themes==2.5.0 -Sphinx==8.2.3 ; python_version >= '3.11' -Sphinx==8.1.3 ; python_version < '3.11' +Sphinx==8.2.3 sphinx-issues==6.0.0 sphinx-jinja==2.0.2 sphinx-tabs==3.5.0 sphinxcontrib-programoutput==0.19 -sphinx-autobuild==2025.8.25 ; python_version >= '3.11' -sphinx-autobuild==2024.10.3 ; python_version < '3.11' +sphinx-autobuild==2025.8.25 sphinx-notfound-page==1.1.0 -myst-parser==4.0.1 +myst-parser==5.0.0 linuxdoc==20240924 aiounittest==1.5.0 yamllint==1.38.0 diff --git a/requirements.txt b/requirements.txt index 8e841f941..a786aa2a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,8 +11,7 @@ httpx[http2]==0.28.1 httpx-socks[asyncio]==0.10.0 sniffio==1.3.1 valkey==6.1.1 -markdown-it-py==3.0.0 -tomli==2.4.0; python_version < '3.11' +markdown-it-py==4.0.0 msgspec==0.20.0 typer==0.24.1 isodate==0.7.2 diff --git a/searx/botdetection/config.py b/searx/botdetection/config.py index d3ecc39eb..418d76a46 100644 --- a/searx/botdetection/config.py +++ b/searx/botdetection/config.py @@ -13,7 +13,7 @@ import copy import logging import pathlib -from ..compat import tomllib +import tomllib __all__ = ['Config', 'UNSET', 'SchemaIssue', 'set_global_cfg', 'get_global_cfg'] diff --git a/searx/compat.py b/searx/compat.py index 2f45eb0e4..418d537ca 100644 --- a/searx/compat.py +++ b/searx/compat.py @@ -1,25 +1,9 @@ # SPDX-License-Identifier: AGPL-3.0-or-later """Compatibility with older versions""" -# pylint: disable=unused-import - -__all__ = [ - "tomllib", -] - -import sys import warnings -# TOML (lib) compatibility -# ------------------------ - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - - # limiter backward compatibility # ------------------------------ diff --git a/tests/unit/test_toml.py b/tests/unit/test_toml.py deleted file mode 100644 index 7a298502b..000000000 --- a/tests/unit/test_toml.py +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later -# pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name - -from tests import SearxTestCase -from searx import compat -from searx.favicons.config import DEFAULT_CFG_TOML_PATH - - -class CompatTest(SearxTestCase): - - def test_toml(self): - with DEFAULT_CFG_TOML_PATH.open("rb") as f: - _ = compat.tomllib.load(f)