Skip to content

Commit

Permalink
Revert breaking change in #126 (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper authored Sep 10, 2024
1 parent 51cf9a7 commit 29f7e15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion v3io/dataplane/kv_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def encode_array(array_value, typecode):
"II" + typecode * num_items, num_items * 8, operand_type, *array_value
)

return base64.b64encode(encoded_array).decode("utf-8")
return base64.b64encode(encoded_array)


def decode(encoded_array):
Expand Down
4 changes: 2 additions & 2 deletions v3io/dataplane/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ def _dict_to_typed_attributes(d):
type_value = value
elif isinstance(value, list):
type_key = "B"
type_value = v3io.dataplane.kv_array.encode_list(value)
type_value = v3io.dataplane.kv_array.encode_list(value).decode("utf-8")
elif isinstance(value, array.array):
type_key = "B"
type_value = v3io.dataplane.kv_array.encode_array(value, value.typecode)
type_value = v3io.dataplane.kv_array.encode_array(value, value.typecode).decode("utf-8")
elif isinstance(value, datetime.datetime):
type_key = "TS"
type_value = v3io.dataplane.kv_timestamp.encode(value)
Expand Down

0 comments on commit 29f7e15

Please sign in to comment.