Skip to content

Commit

Permalink
replace collections.abc.ByteString with (bytes, bytearray).
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-yatsenko committed Feb 22, 2025
1 parent bd1999e commit 5c5a6e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datajoint/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import collections
from decimal import Decimal
import datetime
import typing as tp
import uuid
import numpy as np
from .errors import DataJointError
Expand Down Expand Up @@ -204,7 +205,7 @@ def pack_blob(self, obj):
return self.pack_dict(obj)
if isinstance(obj, str):
return self.pack_string(obj)
if isinstance(obj, collections.abc.Buffer):
if isinstance(obj, (bytes, bytearray)):
return self.pack_bytes(obj)
if isinstance(obj, collections.abc.MutableSequence):
return self.pack_list(obj)
Expand Down

0 comments on commit 5c5a6e0

Please sign in to comment.