Add support for PathLike objects in static file helpers#3059
Merged
davidism merged 1 commit intopallets:masterfrom Jan 5, 2019
Merged
Add support for PathLike objects in static file helpers#3059davidism merged 1 commit intopallets:masterfrom
davidism merged 1 commit intopallets:masterfrom
Conversation
mattrobenolt
commented
Jan 4, 2019
Contributor
Author
|
Also seems that master is broken since the tests failing are unrelated to my changes here afaict. |
Contributor
|
This seems fine. I need to check what's up with master. |
Member
|
I need to fix a test after an improvement to Werkzeug, don't worry about it. |
Contributor
Author
|
@davidism updated the versionadded tag. |
davidism
reviewed
Jan 4, 2019
Member
|
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.
Member
|
Thanks for working on this! If you're interested, I think the underlying path functions from Werkzeug should probably support this as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.