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
[mod] remove deprecate code
Alexandre Flamentf3f61df6a064
diff --git a/searx/data/__init__.py b/searx/data/__init__.pyindex 87bfb5477..424440a71 100644--- a/searx/data/__init__.py+++ b/searx/data/__init__.py@@ -38,7 +38,7 @@ def ahmia_blacklist_loader():This function is used by :py:mod:`searx.plugins.ahmia_filter`."""- with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as f:+ with open(data_dir / 'ahmia_blacklist.txt', encoding='utf-8') as f:return f.read().split()diff --git a/searx/network/__init__.py b/searx/network/__init__.pyindex ced76243d..e8dddd6a0 100644--- a/searx/network/__init__.py+++ b/searx/network/__init__.py@@ -5,41 +5,18 @@import asyncioimport threadingimport concurrent.futures+from queue import SimpleQueuefrom types import MethodTypefrom timeit import default_timerfrom typing import Iterable, Tupleimport httpximport anyio-import h2.exceptionsfrom .network import get_network, initialize, check_network_configurationfrom .client import get_loopfrom .raise_for_httperror import raise_for_httperror-# queue.SimpleQueue: Support Python 3.6-try:- from queue import SimpleQueue-except ImportError:- from queue import Empty- from collections import deque-- class SimpleQueue:- """Minimal backport of queue.SimpleQueue"""-- def __init__(self):- self._queue = deque()- self._count = threading.Semaphore(0)-- def put(self, item):- self._queue.append(item)- self._count.release()-- def get(self):- if not self._count.acquire(True): # pylint: disable=consider-using-with- raise Empty- return self._queue.popleft()-THREADLOCAL = threading.local()"""Thread-local data is data for thread specific values."""