-
-
Notifications
You must be signed in to change notification settings - Fork 364
Open
Labels
enhancementNew features or improvementsNew features or improvements
Description
We are not consistent about the path
attribute of stores right now. localstore
has a root
attribute that's basically a path (with type pathlib.path
), remotestore
has a v2-style explicit path
attribute (with type str
), zipstore
has a path attribute but I think its semantics are not like remotestore.path
, since zipstore.path
points to a location outside the zip file system, etc.
I think we should normalize the store.path
attribute along the following lines:
store.path
is a string that names a location inside the filesystem modeled by the store class. All stores have such apath
attribute.- new store class instances can be created via methods like
store_instance.with_path('new_path')
(completely new path) orstore_instance.join_path('relative_path') (old path + relative_path), or
store_instance / 'relative_path'` as an abbreviation of the last one. - The
StorePath
class goes away entirely, because we are giving stores their own path.
(This API is largely influenced by the yarl.URL
class, which I have been using quite a bit recently)
Thoughts?
Metadata
Metadata
Assignees
Labels
enhancementNew features or improvementsNew features or improvements