-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Update: Python3.13 naming for "flavour" is now "parser", see ParserBase https://github.com/barneygale/pathlib-abc/blob/e429fd2ae079d3c623e687715a8133f4c4769ed2/pathlib_abc/__init__.py#L38
Issue
Starting new issue as requested based on comment in issue #26.
after digging deeper into the code, and exploring the pathlib implementation, I am wondering if UPath would benefit from having something like a _URI_Flavour derived from the pathlib._Flavour class. This might make it easier to have consistent path handling across the fsspec based implementations.
The base class: pathlib._Flavour
The posix implementation: pathlib._PosixFlavour
Here is a list of the members of the class for an idea of what may need to be implemented:
pathlib._PosixFlavour
- altsep
- casefold
- casefold_parts
- compile_pattern
- gethomedir
- has_drv
- is_reserved
- is_supported
- join_parsed_parts
- make_uri
- parse_parts
- pathmod
- resolve
- sep
- splitroot
Of course it probably makes sense to base as much as possible on fsspec functionality, especially considering its ability for url chaining.
Here are some possibly related functions from fsspec.core:
- _un_chain
- url_to_fs
- split_protocol
- strip_protocol