The functions sign and sign_async do not apply the prefix. So for instance this code:
import obstore
from obstore.store import GcsStore
store = GcsStore(bucket=..., prefix="some/prefix")
obs.put(store, "filename.txt", b"Contents")
obs.sign(store, "GET", "filename.txt", expires_in=timedelta(seconds=3600))
contains a subtle bug that seems impossible to notice at first glance. This doesn't seem documented:
paths (str | Sequence[str]) – The path(s) within ObjectStore to retrieve.
This is the same wording a, e.g. the put:
path (str) – The path within ObjectStore for where to save the file.
If this is intended, sign and sign_async documentation should mention this peculiarity? Otherwise, a (maybe? breaking) change in the function signature makes the code above not pass typechecking and fail at runtime with adding a mandatory kwarg use_prefix=True|False, or non-breaking with a "False" default.
The functions
signandsign_asyncdo not apply theprefix. So for instance this code:contains a subtle bug that seems impossible to notice at first glance. This doesn't seem documented:
This is the same wording a, e.g. the
put:If this is intended,
signandsign_asyncdocumentation should mention this peculiarity? Otherwise, a (maybe? breaking) change in the function signature makes the code above not pass typechecking and fail at runtime with adding a mandatory kwarguse_prefix=True|False, or non-breaking with a "False" default.