Skip to content

Commit 5c5a6e0

Browse files
replace collections.abc.ByteString with (bytes, bytearray).
1 parent bd1999e commit 5c5a6e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datajoint/blob.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import collections
99
from decimal import Decimal
1010
import datetime
11+
import typing as tp
1112
import uuid
1213
import numpy as np
1314
from .errors import DataJointError
@@ -204,7 +205,7 @@ def pack_blob(self, obj):
204205
return self.pack_dict(obj)
205206
if isinstance(obj, str):
206207
return self.pack_string(obj)
207-
if isinstance(obj, collections.abc.Buffer):
208+
if isinstance(obj, (bytes, bytearray)):
208209
return self.pack_bytes(obj)
209210
if isinstance(obj, collections.abc.MutableSequence):
210211
return self.pack_list(obj)

0 commit comments

Comments
 (0)