Skip to content

Commit

Permalink
JSONStore: explicit mode in zopen
Browse files Browse the repository at this point in the history
Addresses a FutureWarning introduced in latest monty
  • Loading branch information
rkingsbury committed Dec 29, 2024
1 parent 00537d7 commit 2d6fbb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/maggma/stores/mongolike.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def read_json_file(self, path) -> list:
Args:
path: Path to the JSON file to be read
"""
with zopen(path) as f:
with zopen(path, "r") as f:
data = f.read()
data = data.decode() if isinstance(data, bytes) else data
objects = bson.json_util.loads(data) if "$oid" in data else orjson.loads(data)
Expand Down

0 comments on commit 2d6fbb2

Please sign in to comment.