Skip to content

Commit a2d68af

Browse files
authored
refs_as_fs should set async on target (#544)
1 parent 0613d83 commit a2d68af

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

kerchunk/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def refs_as_fs(
2626
**kwargs,
2727
):
2828
"""Convert a reference set to an fsspec filesystem"""
29+
if fs is not None:
30+
fs.asynchronous = asynchronous
2931
fs = fsspec.filesystem(
3032
"reference",
3133
fo=refs,
@@ -300,6 +302,7 @@ def _inline_array(group, threshold, names, prefix=""):
300302
cond2 = prefix1 in names
301303
if cond1 or cond2:
302304
original_attrs = dict(thing.attrs)
305+
data = thing[:]
303306
arr = group.create_array(
304307
name=name,
305308
dtype=thing.dtype,
@@ -308,7 +311,7 @@ def _inline_array(group, threshold, names, prefix=""):
308311
fill_value=thing.fill_value,
309312
overwrite=True,
310313
)
311-
arr[:] = thing[:]
314+
arr[:] = data
312315
arr.attrs.update(original_attrs)
313316

314317

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ classifiers = [
2020

2121

2222
dependencies = [
23-
"fsspec",
23+
"fsspec>=2025.2.0",
2424
"numcodecs",
2525
"numpy",
2626
"ujson",

0 commit comments

Comments
 (0)