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
I have a question regarding the behavior of _strip_protocol. When comparing s3fs, gcsfs and adlfs I observed that for urlpaths that are missing a container (netloc), leading slashes are lstripped. It seems that this was introduced in #332.
>>> import fsspec
# identical behavior for urlpaths with netloc
>>> fsspec.get_filesystem_class("s3")._strip_protocol("s3://bucket/a/b/c")
'bucket/a/b/c'
>>> fsspec.get_filesystem_class("gs")._strip_protocol("gs://bucket/a/b/c")
'bucket/a/b/c'
>>> fsspec.get_filesystem_class("az")._strip_protocol("az://bucket/a/b/c")
'bucket/a/b/c'
# different behavior for incorrect urlpaths
>>> fsspec.get_filesystem_class("s3")._strip_protocol("s3:///a/b/c")
'/a/b/c'
>>> fsspec.get_filesystem_class("gs")._strip_protocol("gs:///a/b/c")
'/a/b/c'
>>> fsspec.get_filesystem_class("az")._strip_protocol("az:///a/b/c")
'a/b/c' # <- adlfs strips the leading slash
Currently az:///a/b/c and az://a/b/c are considered equivalent. Is this intentional? If not I can work on a PR.
Cheers,
Andreas
The text was updated successfully, but these errors were encountered:
Hello,
I have a question regarding the behavior of
_strip_protocol
. When comparing s3fs, gcsfs and adlfs I observed that for urlpaths that are missing a container (netloc), leading slashes are lstripped. It seems that this was introduced in #332.Currently
az:///a/b/c
andaz://a/b/c
are considered equivalent. Is this intentional? If not I can work on a PR.Cheers,
Andreas
The text was updated successfully, but these errors were encountered: