Skip to content

Commit

Permalink
Merge pull request #38 from TileDB-Inc/ihn/use_proto
Browse files Browse the repository at this point in the history
Use cloudpickle protocol 4 for better compatibility w/ server on Py>3.7
  • Loading branch information
Shelnutt2 authored Nov 21, 2019
2 parents 3a2bf91 + f76dec2 commit 983a9c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tiledb/cloud/cloudarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from .rest_api import rest

import cloudpickle

tiledb_cloud_protocol = 4

import base64
import sys

Expand Down Expand Up @@ -84,7 +87,7 @@ def apply(self, func, subarray, attrs=None, layout=None):
(namespace, array_name) = split_uri(self.uri)
api_instance = client.get_udf_api()

pickledUDF = cloudpickle.dumps(func)
pickledUDF = cloudpickle.dumps(func, protocol=tiledb_cloud_protocol)
pickledUDF = base64.b64encode(pickledUDF).decode("ascii")

ranges = []
Expand Down

0 comments on commit 983a9c5

Please sign in to comment.