Closed ap-- closed 7 months ago
@joouha this might be interesting for euporie.
I've tried getting the join behavior for HTTPPath to be consistent, but I think this is the best compromise.
If you want urljoin
behavior for any UPath, you can use UPath().joinuri(...)
Instead UPath() / "..."
or UPath().joinpath(...)
will provide pathlib
join behavior.
Thanks so much for this.
I tried implementing using urljoin
behaviour with the /
interface a while back, but it felt confusing and wrong when I actually used it, so I think this is a brilliant compromise.
Close #88
This seems to be the best compromise regarding urljoin behavior for
UPath
classes.UPath.joinpath
behaves as close as possible topathlib.Path
and
UPath.joinuri
behaves asurllib.parse.urljoin