From f7d0f2ea20fca4ed9313b8d3157ecd35173635bf Mon Sep 17 00:00:00 2001 From: Tom Krause Date: Tue, 28 Nov 2023 13:53:26 -0700 Subject: [PATCH] Common: quiet urllib3 warnings (#12336) GitOrigin-RevId: 9ed56d429804a791d146a940c203872ee82bc4ea --- descarteslabs/core/common/http/session.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/descarteslabs/core/common/http/session.py b/descarteslabs/core/common/http/session.py index bf53fb45..dfc19eb2 100644 --- a/descarteslabs/core/common/http/session.py +++ b/descarteslabs/core/common/http/session.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging import uuid from http import HTTPStatus @@ -37,6 +38,10 @@ from .proxy import ProxyAuthentication +# Disable warnings for retries etc +logging.getLogger("urllib3").setLevel(logging.ERROR) +logging.getLogger("urllib3").propagate = False + class HttpHeaderKeys: RequestGroup = "X-Request-Group"