From a666010aae8aa9ba67341eeb5e69380fc20d02f5 Mon Sep 17 00:00:00 2001 From: Clay Gerrard Date: Tue, 4 Jun 2024 12:26:55 -0500 Subject: [PATCH] Lazy import is not needed There was an abandoned change that made reference to a RecussionError when running a probe test that imported boto3 that had something to do with eventlet, ssl and a transitive dependency on requests-mock, but the fix that actually got merged seemed to depend on another change to tox.ini that disables request-mock when we run pytest. Either way, we already import from boto3 at the top of probe tests and it's in test-requirements; so we require it to be installed even if you don't have s3api in your pipeline. Related-Change: I789b257635c031ac0cb6e4b5980f741e0cb5244d Related-Change: I2793e335a08ad373c49cbbe6759d4e97cc420867 Related-Change: If14e4d2c1af2efcbc99e9b6fe10973a7eb94d589 Change-Id: Id2662bfc5ef2f21f901f1c98e6389c4cb01818a2 --- test/probe/test_mixed_policy_mpu.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/probe/test_mixed_policy_mpu.py b/test/probe/test_mixed_policy_mpu.py index b7706c3fd2..ed6944bc8a 100644 --- a/test/probe/test_mixed_policy_mpu.py +++ b/test/probe/test_mixed_policy_mpu.py @@ -26,6 +26,7 @@ from test.probe.brain import BrainSplitter from test.probe.common import ReplProbeTest, ENABLED_POLICIES from boto3.s3.transfer import TransferConfig +from test.s3api import get_s3_client import mock @@ -40,8 +41,6 @@ class TestMixedPolicyMPU(ReplProbeTest): if not s3api_info: raise unittest.SkipTest('s3api not enabled') - # lazy import boto only required if cluster supports s3api - from test.s3api import get_s3_client self.s3 = get_s3_client(1) self.bucket_name = 'bucket-%s' % uuid.uuid4()