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] favicons: msgspec.ValidationError: Expected `Path`, got `str` - at `$.favicons.cache.db_url`
Markus Heiserfa4dfd4efea0
diff --git a/searx/favicons/cache.py b/searx/favicons/cache.pyindex c46eb5621..1aa722d89 100644--- a/searx/favicons/cache.py+++ b/searx/favicons/cache.py@@ -20,11 +20,11 @@from __future__ import annotationsfrom typing import Literal+import osimport abcimport dataclassesimport hashlibimport logging-import pathlibimport sqlite3import tempfileimport time@@ -103,7 +103,7 @@ class FaviconCacheConfig(msgspec.Struct): # pylint: disable=too-few-public-meth:py:obj:`.cache.FaviconCacheMEM` (not recommended)"""- db_url: pathlib.Path = pathlib.Path(tempfile.gettempdir()) / "faviconcache.db"+ db_url: str = tempfile.gettempdir() + os.sep + "faviconcache.db""""URL of the SQLite DB, the path to the database file."""HOLD_TIME: int = 60 * 60 * 24 * 30 # 30 daysdiff --git a/searx/favicons/config.py b/searx/favicons/config.pyindex bf53b0821..33aa157d6 100644--- a/searx/favicons/config.py+++ b/searx/favicons/config.py@@ -27,10 +27,10 @@ class FaviconConfig(msgspec.Struct): # pylint: disable=too-few-public-methodsBy specifying a version, it is possible to ensure downward compatibility inthe event of future changes to the configuration schema"""- cache: FaviconCacheConfig = FaviconCacheConfig+ cache: FaviconCacheConfig = msgspec.field(default_factory=FaviconCacheConfig)"""Setup of the :py:obj:`.cache.FaviconCacheConfig`."""- proxy: FaviconProxyConfig = FaviconCacheConfig+ proxy: FaviconProxyConfig = msgspec.field(default_factory=FaviconProxyConfig)"""Setup of the :py:obj:`.proxy.FaviconProxyConfig`."""@classmethod