You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this something we should support? It adds some complexity, because we'd have to decide what to do or how to error with multiple URI schemes or if people use a root slash. (Some of the behavior from pathlib/os.path.join is kind of confusing.)
It would also make an AnyPath (#77) more faithful when dispatching to pathlib.
The text was updated successfully, but these errors were encountered:
# cloudpathlib[gs]==0.16.0
>>> from cloudpathlib import AnyPath
>>> AnyPath('gs://my-bucket', 'my-filename.txt')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ppa-rmh358/.local/lib/python3.10/site-packages/cloudpathlib/anypath.py", line 22, in __new__
return CloudPath(*args, **kwargs) # type: ignore
File "/home/ppa-rmh358/.local/lib/python3.10/site-packages/cloudpathlib/cloudpath.py", line 159, in __call__
path_class.__init__(new_obj, cloud_path, *args, **kwargs) # type: ignore[type-var]
File "/home/ppa-rmh358/.local/lib/python3.10/site-packages/cloudpathlib/cloudpath.py", line 232, in __init__
raise ClientMismatchError(
cloudpathlib.exceptions.ClientMismatchError: Client of type [<class 'str'>] is not valid for cloud path of type [<class 'cloudpathlib.gs.gspath.GSPath'>]; must be instance of [<class 'cloudpathlib.gs.gsclient.GSClient'>], or None to use default client for this cloud path class.
The constructor signature of
pathlib
's path classes is actually:with behavior that follows
os.path.join
's behavior.https://docs.python.org/3/library/pathlib.html#pathlib.PurePath
Is this something we should support? It adds some complexity, because we'd have to decide what to do or how to error with multiple URI schemes or if people use a root slash. (Some of the behavior from
pathlib
/os.path.join
is kind of confusing.)It would also make an
AnyPath
(#77) more faithful when dispatching topathlib
.The text was updated successfully, but these errors were encountered: