Skip to content

Commit 12d064c

Browse files
committed
fixes for upath
1 parent 1c279a4 commit 12d064c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "zarrita"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
description = ""
55
authors = ["Norman Rzepka <[email protected]>"]
66
license = "MIT"

zarrita/store.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def from_path(cls, pth: Path) -> Store:
8282
if isinstance(pth, UPath) and not isinstance(
8383
pth, (PosixUPath, WindowsUPath)
8484
):
85-
storage_options = pth.storage_options.copy()
85+
storage_options = dict(pth.storage_options)
8686
storage_options.pop("_url", None)
8787
return RemoteStore(str(pth), **storage_options)
8888
except ImportError:
@@ -270,7 +270,7 @@ def __init__(self, url: Union[UPath, str], **storage_options: Dict[str, Any]):
270270
from upath import UPath
271271

272272
if isinstance(url, str):
273-
self.root = UPath(url, **storage_options)
273+
self.root = UPath(url, storage_options=storage_options)
274274
else:
275275
assert len(storage_options) == 0, (
276276
"If constructed with a UPath object, no additional "
@@ -284,7 +284,7 @@ def __init__(self, url: Union[UPath, str], **storage_options: Dict[str, Any]):
284284
assert fs.__class__.async_impl, "FileSystem needs to support async operations."
285285

286286
def make_fs(self) -> Tuple[AsyncFileSystem, str]:
287-
storage_options = self.root.storage_options.copy()
287+
storage_options = dict(self.root.storage_options)
288288
storage_options.pop("_url", None)
289289
fs, root = fsspec.core.url_to_fs(
290290
str(self.root), asynchronous=True, **self.root.storage_options

0 commit comments

Comments
 (0)