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

Commit

Permalink
Fixed package names for persistent files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Dec 4, 2020
1 parent 32a9072 commit 9d03188
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions awkward0/persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
["awkward0.util", "frombuffer"],
["awkward0.persist"],
["awkward0.arrow", "_ParquetFile", "fromjson"],
["awkward", "*Array"],
["awkward", "Table"],
["awkward", "numpy", "frombuffer"],
["awkward.util", "frombuffer"],
["awkward.persist"],
["awkward.arrow", "_ParquetFile", "fromjson"],
["uproot3_methods.classes.*"],
["uproot3_methods.profiles.*"],
["uproot_methods.classes.*"],
["uproot_methods.profiles.*"],
["uproot.tree", "_LazyFiles"],
Expand All @@ -63,6 +71,8 @@ def spec2function(obj, whitelist=whitelist):
obj = [awkwardlib] + obj[1:]
elif obj[0] == "awkward":
obj = [awkwardlib] + obj[1:]
if obj[0].startswith("uproot_methods"):
obj = ["uproot3_methods" + obj[0][14:]] + obj[1:]
gen, genname = importlib.import_module(obj[0]), obj[1:]
if not isinstance(gen, types.ModuleType):
raise TypeError("first item of a function description must be a module")
Expand Down Expand Up @@ -501,8 +511,8 @@ def deserialize(storage, name="", whitelist=whitelist, cache=None, seen=None):
schema = schema.decode("ascii")
schema = json.loads(schema)

if "awkward0" not in schema:
raise ValueError("JSON object is not an Awkward Array schema (missing 'awkward0' field)")
if "awkward" not in schema:
raise ValueError("JSON object is not an Awkward Array schema (missing 'awkward' field)")

prefix = schema.get("prefix", "")
if seen is None:
Expand Down
2 changes: 1 addition & 1 deletion awkward0/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import re

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

Expand Down

0 comments on commit 9d03188

Please sign in to comment.