Improve error message when providing UPath
instances to open()
#124
Labels
compatibility 🤝
Compatibility with stdlib pathlib
UPath
instances to open()
#124
Currently opening a
UPath
viaopen
fails with a FileNotFoundError because the URI returned via__fspath__()
is just interpreted as a string path.There's two possible ways of improving this error:
__fspath__
.open
(1) would be preferable, but (2) might be useful, since there's some code out there that uses
__fspath__
to convert os.PathLike to strings.Need to do a survey of code on github, and if we choose (1) there needs to be a deprecation period.
The text was updated successfully, but these errors were encountered: