Skip to content

Commit

Permalink
fixes for upath
Browse files Browse the repository at this point in the history
  • Loading branch information
normanrz committed Aug 13, 2024
1 parent 1c279a4 commit 12d064c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zarrita"
version = "0.2.5"
version = "0.2.6"
description = ""
authors = ["Norman Rzepka <code@normanrz.com>"]
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions zarrita/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def from_path(cls, pth: Path) -> Store:
if isinstance(pth, UPath) and not isinstance(
pth, (PosixUPath, WindowsUPath)
):
storage_options = pth.storage_options.copy()
storage_options = dict(pth.storage_options)
storage_options.pop("_url", None)
return RemoteStore(str(pth), **storage_options)
except ImportError:
Expand Down Expand Up @@ -270,7 +270,7 @@ def __init__(self, url: Union[UPath, str], **storage_options: Dict[str, Any]):
from upath import UPath

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

def make_fs(self) -> Tuple[AsyncFileSystem, str]:
storage_options = self.root.storage_options.copy()
storage_options = dict(self.root.storage_options)
storage_options.pop("_url", None)
fs, root = fsspec.core.url_to_fs(
str(self.root), asynchronous=True, **self.root.storage_options
Expand Down

0 comments on commit 12d064c

Please sign in to comment.