Repository navigation
Conversation
added 7 commits
July 25, 2020 23:57
…s it seems to be unneccessary
|
This feature would be very much appreciated! |
Author
|
I guess this is too old already. I'll try to merge the changes to my fork in a few days. |
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.
related to #546 #1631 #1365 #1443
This adds encoding and errors for most sftp client functions.
file.py also needed to be adjusted.
Why did I prefer adding the optional parameter "encoding" instead of only adding "errors"?
Well, this way the user can choose the encoding if he wants. If the remote doesn't support utf-8 or the folder includes file names using another encoding than utf-8, you would not be able to work with these files in any way. Only adding encoding will ensure that.
Most users will know the encoding used by the remote system, so I would not see any difficulties there either.
Rewriting the code to only use binary internally would be a rather big change to the code, I guess. So this is why I would prefer to simply add an optional parameter defaulting to the current usage inside paramiko.
I ran some local tests and also pytest to ensure that no code has been broken by my changes.
Best regards,
Hakaishi