Skip to content

Commit 3199117

Browse files
replace collections.abc.ByteString with collections.abc.Buffer
1 parent 6d6246b commit 3199117

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

datajoint/blob.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def pack_blob(self, obj):
204204
return self.pack_dict(obj)
205205
if isinstance(obj, str):
206206
return self.pack_string(obj)
207-
if isinstance(obj, collections.abc.ByteString):
207+
if isinstance(obj, collections.abc.Buffer):
208208
return self.pack_bytes(obj)
209209
if isinstance(obj, collections.abc.MutableSequence):
210210
return self.pack_list(obj)

datajoint/declare.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,9 @@ def _make_attribute_alter(new, old, primary_key):
398398
command=(
399399
"ADD"
400400
if (old_name or new_name) not in old_names
401-
else "MODIFY" if not old_name else "CHANGE `%s`" % old_name
401+
else "MODIFY"
402+
if not old_name
403+
else "CHANGE `%s`" % old_name
402404
),
403405
new_def=new_def,
404406
after="" if after is None else "AFTER `%s`" % after,

0 commit comments

Comments
 (0)