Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
add uproot_methods.classes.* and lzma/lz4 to the whitelist for deseri…
Browse files Browse the repository at this point in the history
…alization
  • Loading branch information
jpivarski committed Mar 29, 2019
1 parent ad4a82c commit 5dd1d35
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
26 changes: 16 additions & 10 deletions awkward/persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,27 @@
import awkward.version

compression = [
{"minsize": 8192, "types": [numpy.bool_, numpy.bool, numpy.integer], "contexts": "*", "pair": (zlib.compress, ("zlib", "decompress"))},
{"minsize": 8192, "types": [numpy.bool_, numpy.bool, numpy.integer], "contexts": "*", "pair": (zlib.compress, ("zlib", "decompress"))},
]

partner = {
zlib.compress: ("zlib", "decompress"),
zlib.compress: ("zlib", "decompress"),
}

whitelist = [["awkward.util", "frombuffer"],
["numpy", "frombuffer"],
["zlib", "decompress"],
["awkward", "*Array"],
["awkward", "Table"],
["awkward", "numpy", "frombuffer"],
["awkward.persist", "*"],
["awkward.arrow", "_ParquetFile", "fromjson"]]
whitelist = [
["numpy", "frombuffer"],
["zlib", "decompress"],
["lzma", "decompress"],
["backports.lzma", "decompress"],
["lz4.block", "decompress"],
["awkward", "*Array"],
["awkward", "Table"],
["awkward", "numpy", "frombuffer"],
["awkward.util", "frombuffer"],
["awkward.persist", "*"],
["awkward.arrow", "_ParquetFile", "fromjson"],
["uproot_methods.classes.*"],
]

def frompython(obj):
return base64.b64encode(pickle.dumps(obj)).decode("ascii")
Expand Down
2 changes: 1 addition & 1 deletion awkward/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import re

__version__ = "0.8.13"
__version__ = "0.8.14"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit 5dd1d35

Please sign in to comment.