fsspec / fsspec/filesystem_spec
ArrowFSWrapper._strip_protocol differs from pure fsspec implementation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 490
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
Not sure if this is a "bug", but I ran into this discrepancy in https://github.com/dask/dask/pull/9699 for a local Windows filesystem, and needed to add an explicit workaround. Therefore, I'd like to establish what the "correct" behavior should be.
Reproducer:
from fsspec.implementations.local import LocalFileSystem
from fsspec.implementations.arrow import ArrowFSWrapper
from pyarrow.fs import LocalFileSystem as PALocalFileSystem
path = "C:\\MyPath\\to\\fake.parquet"
fs = LocalFileSystem()
fs_aw = ArrowFSWrapper(PALocalFileSystem())
print("Pure fsspec:", fs._strip_protocol(path))
print("Wrapped pyarrow:", fs_aw._strip_protocol(path))
Output:
Pure fsspec: /home/nfs/rzamora/workspace/cudf-23.02/dask/C:\MyPath\to\fake.parquet
Wrapped pyarrow: C:\MyPath\to\fake.parquet
Question: What should _strip_protocol return in this case?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided reproducer and compare LocalFileSystem._strip_protocol with ArrowFSWrapper._strip_protocol for the Windows-style path. Determine and document the intended return value, then add regression coverage for the agreed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100