Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pathlib.Path for all paths #36

Open
salkinium opened this issue May 5, 2019 · 3 comments
Open

Use pathlib.Path for all paths #36

salkinium opened this issue May 5, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@salkinium
Copy link
Member

At the moment there is a mix of use of both os.path and pathlib.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

@salkinium
Copy link
Member Author

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.

@salkinium salkinium added the enhancement New feature or request label May 5, 2019
@salkinium
Copy link
Member Author

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.

@salkinium salkinium added this to the v2.0 milestone Jul 7, 2019
@salkinium
Copy link
Member Author

Keeping this open for v2

@salkinium salkinium reopened this Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant