From 164167dea0a0823845de42188818e7f80262aa71 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Sat, 20 Sep 2025 11:12:34 +0200 Subject: [PATCH] [mod] py: remove uvloop (#5220) We get some good stuff without uvloop, 13MB~ less of dependencies, 3 minutes of build time for armv7 saved, and we are one step closer to NT compatibility. Although it's true that theoretically the raw performance have worsened on network side (we only used uvloop for that), the latest cpython versions have been improving on asyncio performance. --- container/dist.dockerfile | 1 - manage | 1 - requirements.txt | 1 - searx/network/client.py | 4 ---- 4 files changed, 7 deletions(-) diff --git a/container/dist.dockerfile b/container/dist.dockerfile index 326f62b0d..2270bdefd 100644 --- a/container/dist.dockerfile +++ b/container/dist.dockerfile @@ -30,7 +30,6 @@ ENV SEARXNG_VERSION="$VERSION" \ GRANIAN_HOST="::" \ GRANIAN_PORT="8080" \ GRANIAN_WEBSOCKETS="false" \ - GRANIAN_LOOP="uvloop" \ GRANIAN_BLOCKING_THREADS="4" \ GRANIAN_WORKERS_KILL_TIMEOUT="30s" \ GRANIAN_BLOCKING_THREADS_IDLE_TIMEOUT="5m" diff --git a/manage b/manage index de01d167e..15ca0eeff 100755 --- a/manage +++ b/manage @@ -159,7 +159,6 @@ webapp.run() { GRANIAN_HOST="::" \ GRANIAN_PORT="8888" \ GRANIAN_WEBSOCKETS="false" \ - GRANIAN_LOOP="uvloop" \ GRANIAN_BLOCKING_THREADS="4" \ GRANIAN_WORKERS_KILL_TIMEOUT="30s" \ GRANIAN_BLOCKING_THREADS_IDLE_TIMEOUT="5m" \ diff --git a/requirements.txt b/requirements.txt index 0bbbf0d01..1c532849a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,6 @@ pyyaml==6.0.2 httpx[http2]==0.28.1 httpx-socks[asyncio]==0.10.0 Brotli==1.1.0 -uvloop==0.21.0 setproctitle==1.3.7 valkey==6.1.1 markdown-it-py==3.0.0 diff --git a/searx/network/client.py b/searx/network/client.py index bd21bc9b5..c7c07c385 100644 --- a/searx/network/client.py +++ b/searx/network/client.py @@ -13,13 +13,9 @@ import threading import httpx from httpx_socks import AsyncProxyTransport from python_socks import parse_proxy_url, ProxyConnectionError, ProxyTimeoutError, ProxyError -import uvloop from searx import logger - -uvloop.install() - CertTypes = str | tuple[str, str] | tuple[str, str, str] SslContextKeyType = tuple[str | None, CertTypes | None, bool, bool]