From 731408d7c6609295d7ea4cd376634427027d4a59 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sun, 7 May 2023 18:17:11 -0700 Subject: [PATCH] Remove use of collections.abc.ByteString This is an ABC that never really made much sense and was deprecated in https://github.com/python/cpython/issues/91896 --- django_unicorn/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_unicorn/utils.py b/django_unicorn/utils.py index 3d1d5e3f..1555d85d 100644 --- a/django_unicorn/utils.py +++ b/django_unicorn/utils.py @@ -280,7 +280,7 @@ def is_non_string_sequence(obj): if ( isinstance(obj, collections.abc.Sequence) or isinstance(obj, collections.abc.Set) - ) and not isinstance(obj, (str, collections.abc.ByteString)): + ) and not isinstance(obj, (str, bytes, bytearray)): return True return False