-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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 support for PathLike objects in static file helpers #3059
Conversation
Also seems that master is broken since the tests failing are unrelated to my changes here afaict. |
This seems fine. I need to check what's up with master. |
I need to fix a test after an improvement to Werkzeug, don't worry about it. |
@davidism updated the versionadded tag. |
Thanks, I'll rebase and merge this once I get the test fixed. |
See: https://www.python.org/dev/peps/pep-0519/ This is mostly encountered with pathlib in python 3, but this API suggests any PathLike object can be treated like a filepath with `__fspath__` function.
Thanks for working on this! If you're interested, I think the underlying path functions from Werkzeug should probably support this as well. |
See: https://www.python.org/dev/peps/pep-0519/
This is mostly encountered with pathlib in python 3, but this API
suggests any PathLike object can be treated like a filepath with
__fspath__
function.