From acaa90b443fbc19c00ce20ff3d1ef893d6bfaa7b Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Tue, 15 Dec 2020 10:38:13 -0800 Subject: [PATCH 1/5] WIP: CI: Supress urllib3 tests in pytest --- 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 5d4705dbe7d77..622166f04a683 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -50,7 +50,7 @@ def s3_base(worker_id): pytest.importorskip("s3fs") pytest.importorskip("boto3") requests = pytest.importorskip("requests") - logging.getLogger("requests").disabled = True + logging.getLogger("urllib3").propagate = False with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise, From a373580e1f573ba2c0c0d6f94a7d190bdf7f31db Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Tue, 15 Dec 2020 12:08:44 -0800 Subject: [PATCH 2/5] see what loggers exist --- pandas/tests/io/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index 622166f04a683..e639fdeaca008 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -74,6 +74,8 @@ def s3_base(worker_id): stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, ) + for key in logging.Logger.manager.loggerDict: + print(key) timeout = 5 while timeout > 0: From fcd2bd0dd6e6ff22a912037dd1de02f82ef7b87f Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Tue, 15 Dec 2020 17:28:31 -0800 Subject: [PATCH 3/5] Log so maybe it shows better --- 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 e639fdeaca008..829534810d9ab 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") logging.getLogger("urllib3").propagate = False - + logger = logging.getLogger() with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise, # see https://github.com/spulec/moto/issues/1924 & 1952 @@ -75,7 +75,7 @@ def s3_base(worker_id): stderr=subprocess.DEVNULL, ) for key in logging.Logger.manager.loggerDict: - print(key) + logger.critical(key) timeout = 5 while timeout > 0: From 963accd3f5af3bf35aa6585c03a91d9b3598df44 Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Tue, 15 Dec 2020 22:45:54 -0800 Subject: [PATCH 4/5] Disable botocore? --- pandas/tests/io/conftest.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index 829534810d9ab..6e7eb64f5cc60 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -50,8 +50,7 @@ def s3_base(worker_id): pytest.importorskip("s3fs") pytest.importorskip("boto3") requests = pytest.importorskip("requests") - logging.getLogger("urllib3").propagate = False - logger = logging.getLogger() + with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise, # see https://github.com/spulec/moto/issues/1924 & 1952 @@ -74,8 +73,6 @@ def s3_base(worker_id): stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, ) - for key in logging.Logger.manager.loggerDict: - logger.critical(key) timeout = 5 while timeout > 0: @@ -113,6 +110,8 @@ def s3_resource(s3_base, tips_file, jsonl_file, feather_file): import boto3 import s3fs + logging.getLogger("botocore.vendored.requests.packages.urllib3").disabled = True + test_s3_files = [ ("tips#1.csv", tips_file), ("tips.csv", tips_file), From f37bda1b3eae305810fbdfaddb73b4349195dfce Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Wed, 16 Dec 2020 00:07:39 -0800 Subject: [PATCH 5/5] Disable all loggers --- pandas/tests/io/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index 6e7eb64f5cc60..f859a22c5f44d 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -110,7 +110,8 @@ def s3_resource(s3_base, tips_file, jsonl_file, feather_file): import boto3 import s3fs - logging.getLogger("botocore.vendored.requests.packages.urllib3").disabled = True + for logging_key in logging.Logger.manager.loggerDict: + logging.getLogger(logging_key).disabled = True test_s3_files = [ ("tips#1.csv", tips_file),