From f6424dd72a67997be3f36788c110e4a7e3547a45 Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Thu, 26 Nov 2020 11:29:00 -0800 Subject: [PATCH 1/3] TST: Supress http logs in tests --- pandas/tests/io/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index e9f228b5973b5..0cda60137a227 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -1,3 +1,4 @@ +import logging import os import shlex import subprocess @@ -49,6 +50,8 @@ def s3_base(worker_id): pytest.importorskip("s3fs") pytest.importorskip("boto3") requests = pytest.importorskip("requests") + # GH 38090: Suppress http logs in tests + logging.getLogger("urllib3").propagate = False with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise, From 17c6a9acbddc81df554f743f958239a8d9802256 Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Fri, 27 Nov 2020 11:14:45 -0800 Subject: [PATCH 2/3] botocore instead of urllib3 --- pandas/tests/io/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index 0cda60137a227..49245c048c3df 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -51,7 +51,7 @@ def s3_base(worker_id): pytest.importorskip("boto3") requests = pytest.importorskip("requests") # GH 38090: Suppress http logs in tests - logging.getLogger("urllib3").propagate = False + logging.getLogger("botocore").propagate = False with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise, From 69ce223d26d24896001f7fdc328155bf165a8ade Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Fri, 27 Nov 2020 23:24:28 -0800 Subject: [PATCH 3/3] Try werkzeug --- pandas/tests/io/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index 49245c048c3df..bcc666a88e3be 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -50,8 +50,8 @@ def s3_base(worker_id): pytest.importorskip("s3fs") pytest.importorskip("boto3") requests = pytest.importorskip("requests") - # GH 38090: Suppress http logs in tests - logging.getLogger("botocore").propagate = False + # GH 38090: Suppress http logs in tests by moto_server + logging.getLogger("werkzeug").disabled = True with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise,