Open salkinium opened 5 years ago
We need to be careful to preserve backwards compatiblity for anything paths we output. pathlib paths don't convert to string in all the usual cases.
This is actually a difficult thing to implement, since an empty path ""
cannot be stored in Path("")
-> Path(".")
. This is particularly an issue for PathOption, which cannot be backwards compatible this way. Returning Path() from repopath()
and localpath()
is also not backwards compatible.
Keeping this open for v2
At the moment there is a mix of use of both
os.path
andpathlib.Path
which is really annoying to cast around interally.The goal is to only use pathlib interally and convert all path inputs to pathlib. Do we also want to return pathlib objects instead of strings? cc @dergraaf