Repository navigation
Accept PathLike local destinations in synchronous get - #2278
Open
adenzhou1350 wants to merge 1 commit into
Open
adenzhou1350 wants to merge 1 commit into
adenzhou1350 wants to merge 1 commit into
Conversation
Signed-off-by: Xucheng Zhou <aden1350@outlook.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #896.
get(remote_path, pathlib.Path(local_path))raisesTypeError: object of type 'Path' has no len()because a scalar PathLike destination reachesother_pathsas though it were a destination list.Pass
os.PathLikedestinations through the existingmake_path_posixnormalization, just as string destinations already are. Lists retain their existing behavior. The real async_getalready normalizes PathLike destinations and needs no change.Regression coverage uses the public memory filesystem
getwith strings, pathlib and a custom__fspath__object: renamed files, existing directories, globs, source lists, explicit destination lists and recursive copies with/without trailing slashes.Validation against master
94afb3f6:|filenames, and both environments lack themockerfixture. No newly failing test names.AI-assisted; independently reproduced through the actual filesystem implementation, not an extracted helper or mocked import.