@@ -82,7 +82,7 @@ def from_path(cls, pth: Path) -> Store:
82
82
if isinstance (pth , UPath ) and not isinstance (
83
83
pth , (PosixUPath , WindowsUPath )
84
84
):
85
- storage_options = pth .storage_options . copy ( )
85
+ storage_options = dict ( pth .storage_options )
86
86
storage_options .pop ("_url" , None )
87
87
return RemoteStore (str (pth ), ** storage_options )
88
88
except ImportError :
@@ -270,7 +270,7 @@ def __init__(self, url: Union[UPath, str], **storage_options: Dict[str, Any]):
270
270
from upath import UPath
271
271
272
272
if isinstance (url , str ):
273
- self .root = UPath (url , ** storage_options )
273
+ self .root = UPath (url , storage_options = storage_options )
274
274
else :
275
275
assert len (storage_options ) == 0 , (
276
276
"If constructed with a UPath object, no additional "
@@ -284,7 +284,7 @@ def __init__(self, url: Union[UPath, str], **storage_options: Dict[str, Any]):
284
284
assert fs .__class__ .async_impl , "FileSystem needs to support async operations."
285
285
286
286
def make_fs (self ) -> Tuple [AsyncFileSystem , str ]:
287
- storage_options = self .root .storage_options . copy ( )
287
+ storage_options = dict ( self .root .storage_options )
288
288
storage_options .pop ("_url" , None )
289
289
fs , root = fsspec .core .url_to_fs (
290
290
str (self .root ), asynchronous = True , ** self .root .storage_options
0 commit comments