You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, that's a good idea. I've read about .fspath but it never occurred to me that this related to Unipath. I'm still transitioning from Python 2 to 3 and I'm waiting until I'm fully on Python 3.6 before using 'pathlib' where the stdlib functions support it because it's too much to manage a Python 2/3 codebase at the same time as a must-str()-pathlib codebase: it cancels out most of the benefits of using 'pathlib' in the first place.
Also if you have any ideas for #23 that would be helpful. I have no idea what's wrong or what to do about it.
Python 3.6 introduced PEP 519
Short summary in python 3.6 here: https://docs.python.org/3/whatsnew/3.6.html#pep-519-adding-a-file-system-path-protocol
Presently the above code would fail with
TypeError: arguments must be str, unicode, list, int, long, or Path
If
os.fspath
is present it could be used to convert a path-like object into a string.(
unipath.Path
could also be changed to implement__fspath__
but sincestr
is already an ancestor class I'm not sure that what it would achieve)The text was updated successfully, but these errors were encountered: