From f1ff604b4cb012ea85e6244134808d49c3797b16 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Fri, 19 Apr 2024 12:48:53 +0800 Subject: [PATCH] httpx: use "proxy" argument instead of deprecated "proxies" --- nvchecker/httpclient/httpx_httpclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvchecker/httpclient/httpx_httpclient.py b/nvchecker/httpclient/httpx_httpclient.py index cacb915..6604727 100644 --- a/nvchecker/httpclient/httpx_httpclient.py +++ b/nvchecker/httpclient/httpx_httpclient.py @@ -1,5 +1,5 @@ # MIT licensed -# Copyright (c) 2020 lilydjwg , et al. +# Copyright (c) 2020-2022,2024 lilydjwg , et al. from typing import Dict, Optional, Tuple @@ -34,7 +34,7 @@ class HttpxSession(BaseSession): client = httpx.AsyncClient( timeout = httpx.Timeout(self.timeout, pool=None), http2 = True, - proxies = {'all://': proxy}, + proxy = proxy, verify = verify_cert, ) self.clients[(proxy, verify_cert)] = client