fsspec / universal_pathlib

pathlib api extended to use fsspec backends
MIT License
251 stars 44 forks source link

UPath.open: add mode argument default #61

Closed jstriebel closed 2 years ago

jstriebel commented 2 years ago

The missing default for the mode argument lead to errors, as the default of HTTPFile in fsspec is rb, not r as in pathlib.Path.

E.g. the following command produced an error before, which is fixed by using the actual Path implementation default now:

from upath import UPath
UPath("http://raw.githubusercontent.com/fsspec/universal_pathlib/main/README.md").open(encoding="utf-8").read()