-
Notifications
You must be signed in to change notification settings - Fork 101
add pathlib support #151
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
add pathlib support #151
Conversation
|
Why is Edit: I was thinking of having e.g. |
|
@Akuli hey that's a good idea! I originally had some thought about I'd love to hear some input from an appdirs maintainer, what approach do y'all prefer? |
Can you give an example of a use case where this behaviour would be useful? I can't think of any. I either want I think the simplest way to do this might be: Things that I consider advantages with this approach:
Possible disadvantage:
I'd like to know what other people think. Also, if this was my project, I would want |
See also #120, #123
I'd really like pathlib support, so I thought I'd try my hand at an implementation to see if I can get something merged. This implementation builds off of the comments made in #123 by having completely separate functions / class so that current behavior will not change at all.
Currently my implementation falls back on returning strings if it fails to import pathlib. Is this desired behavior, or would you rather raise an exception if pathlib isn't available? We could also move pathlib to another file
_pathlib.pyand only import these functions / class into the appdirs namespace if pathlib is available.