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

PEP 519 Support #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

PEP 519 Support #25

wants to merge 3 commits into from

Conversation

levic
Copy link

@levic levic commented Sep 7, 2017

Addresses #24

  • Now handles python 3.6 DirEntry and pathlib.Path
  • AbstractPath probably doesn't need __fspath__() since it already extends str and anything handling os.PathLike probably has strings as a special case already (isinstance('', os.PathLike) is False), but I put it in there anyway
  • Updated documentation (not that there's much to update) but didn't regenerate the html; no version bump -- I assume this would be part of a release/build step?

There is no special-case handling of pathlib or DirEntry, this is purely a PEP519 implementation (ie for python <3.6 things will continue to fail)

@levic
Copy link
Author

levic commented Sep 8, 2017

(It should be noted that the bulk of the work is actually done in the python std lib: Unipath is just a wrapper to os.path. As long as you let PathLike instances through the type check then os.path takes care of calling __fspath__ on the relevant objects for you)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant