From 9ad6d7df6f89d2f7b6bdd794a9b23ad1b26e6086 Mon Sep 17 00:00:00 2001 From: dolfies Date: Tue, 2 Jan 2024 16:06:54 -0500 Subject: [PATCH] Ignore curl_cffi warnings for now --- discord/http.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/http.py b/discord/http.py index 3fec5f46e34d..b059f7d0e348 100644 --- a/discord/http.py +++ b/discord/http.py @@ -52,6 +52,7 @@ overload, ) from urllib.parse import quote as _uriquote +import warnings import aiohttp from curl_cffi import requests @@ -166,6 +167,9 @@ def _gen_accept_encoding_header(): # aiohttp does it for us on newer versions anyway pass +# HACK: Ignore event loop warnings from curl_cffi +warnings.filterwarnings('ignore', module='curl_cffi') + async def json_or_text(response: Union[aiohttp.ClientResponse, requests.Response]) -> Union[Dict[str, Any], str]: if isinstance(response, aiohttp.ClientResponse):