filesystem_spec icon indicating copy to clipboard operation
filesystem_spec copied to clipboard

Should file:// with hostname raise NotImplementedError?

Open timsnyder opened this issue 3 years ago • 3 comments

I was recently reminded that file: URIs can specify a hostname. If a file: URI is passed with a hostname, it is currently dropped on the floor silently. Should something raise NotImplementedError to avoid any confusion? If so, I'm happy to create a test for this case and submit a PR.

timsnyder avatar Jul 26 '22 17:07 timsnyder

I suppose maybe? I don't have a strong feeling, I've never seen such URIs.

martindurant avatar Jul 26 '22 19:07 martindurant

I agree that it is unlikely to encounter file: uri that specify a hostname. I always forget that the RFC for file uri even allows for it. I was only using this as an excuse to get familiar with the code.

https://datatracker.ietf.org/doc/html/rfc8089#section-3 is the section of rfc-8089 that deals with file uri and local filesystem paths.

If I get a chance, I'll submit pr with a test and patch to for it just to learn more about fsspec.

On Tue, Jul 26, 2022, 2:37 PM Martin Durant @.***> wrote:

I suppose maybe? I don't have a strong feeling, I've never seen such URIs.

— Reply to this email directly, view it on GitHub https://github.com/fsspec/filesystem_spec/issues/998#issuecomment-1195900264, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUPBQ255SJOM6I54U5V33VWA5ARANCNFSM54WXJQPA . You are receiving this because you authored the thread.Message ID: @.***>

timsnyder avatar Jul 26 '22 20:07 timsnyder

👍

martindurant avatar Jul 26 '22 20:07 martindurant