Skip to content

Commit

Permalink
refs_as_fs should set async on target (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant authored Feb 20, 2025
1 parent 0613d83 commit a2d68af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion kerchunk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def refs_as_fs(
**kwargs,
):
"""Convert a reference set to an fsspec filesystem"""
if fs is not None:
fs.asynchronous = asynchronous
fs = fsspec.filesystem(
"reference",
fo=refs,
Expand Down Expand Up @@ -300,6 +302,7 @@ def _inline_array(group, threshold, names, prefix=""):
cond2 = prefix1 in names
if cond1 or cond2:
original_attrs = dict(thing.attrs)
data = thing[:]
arr = group.create_array(
name=name,
dtype=thing.dtype,
Expand All @@ -308,7 +311,7 @@ def _inline_array(group, threshold, names, prefix=""):
fill_value=thing.fill_value,
overwrite=True,
)
arr[:] = thing[:]
arr[:] = data
arr.attrs.update(original_attrs)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [


dependencies = [
"fsspec",
"fsspec>=2025.2.0",
"numcodecs",
"numpy",
"ujson",
Expand Down

0 comments on commit a2d68af

Please sign in to comment.