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
Thanks for opening this issue - I had to take some time off and never got round to doing it myself.
I'm mainly interested in data uris (which I want to support in euporie), which consist of a scheme and a rootless path, with no authority part, query string, or fragment, e.g.:
I think you previously said you don't want to support these in universal_pathlib, but it would be nice to be able to write a UPath subclass and integrate them via the registry system.
This worked previously, but changing to using fsspec.core.split_protocol to extract the uri scheme (protocol) broke this, as the current implementation assumes the path is absolute, or that an authority is present.
In the draft-PR #152 for Python 3.12 support I kept your data uri usecase in mind and switched to a non-fsspec split_protocol implementation. This will at some point become the default implementation for all python versions.
And yes, while I still think that a data UPath class shouldn't necessarily be shipped in universal_pathlib, I fully agree that we shouldn't make it hard for a custom implementation to interpret the path part of the uri in whatever way possible.
So in the meantime, since euporie is one of the popular dependents I'd be happy to keep your custom use case working. If you could make a PR that adds a minimal 3rd-party test (like in https://github.com/fsspec/universal_pathlib/blob/main/upath/tests/third_party/test_pydantic.py) for the data UPath usecase in euporie, that would be great. (As I understand these tests should then fail for the current version)
I can then start working on backporting some of the stuff from #152 to the current implementation.
This is specifically regarding URIs of the form "file:path/to/somewhere"
We should provide a correct error message for now, and in case pathlib or we decide to support parsing relative path uri's we can switch, see:
file:path/file.txt
pathlib.Path.from_uri()
classmethod. python/cpython#107640Originally posted by @ap-- in #108 (comment)
The text was updated successfully, but these errors were encountered: