From 5ae14d0ef943bb8ae72152a723f0bfd65ae0b91c Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Sun, 12 Mar 2023 15:33:34 -0400 Subject: [PATCH] s3website: collections.Container removed from python3.10 Fixes: https://tracker.ceph.com/issues/58960 Signed-off-by: Casey Bodley (cherry picked from commit 97c0338adfa8c0d51b1c24ba69882218fc7c23e9) --- s3tests/functional/test_s3_website.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/s3tests/functional/test_s3_website.py b/s3tests/functional/test_s3_website.py index 8cc04ed..641cd71 100644 --- a/s3tests/functional/test_s3_website.py +++ b/s3tests/functional/test_s3_website.py @@ -1,5 +1,5 @@ import sys -import collections +from collections.abc import Container import pytest import string import random @@ -159,9 +159,9 @@ def _test_website_prep(bucket, xml_template, hardcoded_fields = {}, expect_fail= return f def __website_expected_reponse_status(res, status, reason): - if not isinstance(status, collections.Container): + if not isinstance(status, Container): status = set([status]) - if not isinstance(reason, collections.Container): + if not isinstance(reason, Container): reason = set([reason]) if status is not IGNORE_FIELD: @@ -179,7 +179,7 @@ def _website_expected_default_html(**kwargs): v = kwargs[k] if isinstance(v, str): v = [v] - elif not isinstance(v, collections.Container): + elif not isinstance(v, Container): v = [v] for v2 in v: s = '
  • %s: %s
  • ' % (k,v2) @@ -199,7 +199,7 @@ def _website_expected_error_response(res, bucket_name, status, reason, code, con if code is not IGNORE_FIELD: assert errorcode == code - if not isinstance(content, collections.Container): + if not isinstance(content, Container): content = set([content]) for f in content: if f is not IGNORE_FIELD and f is not None: