-
Notifications
You must be signed in to change notification settings - Fork 8
Replacing pysftp with sftpretty (maintained fork of pysftp) #67
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
base: develop
Are you sure you want to change the base?
Replacing pysftp with sftpretty (maintained fork of pysftp) #67
Conversation
| import sftpretty | ||
| import paramiko |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import sftpretty | |
| import paramiko | |
| sftpretty= None | |
| try: | |
| import sftpretty | |
| import paramiko | |
| except (ImportError, SyntaxError): | |
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Jakub, thanks for taking a look at it. I'm not super familiar with the PR process. Should I add this suggestion to my PR? Or will you guys add it, in the review process? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI, thanks for the PR.
Yes, you have to add the suggestions in your branch so it is part of the PR. You can either do local changes and push them or with "suggestion" comments you can just use the Commit suggestion button (if you agree with the changes, to fultill the review process).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this part, as I didn't quite understand the utility of not failing immediately, only to fail later. Would you mind explaining the thought process behind it?
Furthermore, I removed this part:
if not pysftp:
raise ImportError
Which should probably be re-added with sftpretty. In case of adding the try/except block on import.
if not sftpretty:
raise ImportError
…t error later exactly like previous code, just with sftpretty.
Changelog Description
ImportERRORon SiteSync start when using SFTP provider.resolve #17
Additional review information
pysftp throws and error when imported, as it imports features from paramiko that has been removed due to deprecation. pysftp is an unmaintained library. This PR replaces pysftp with sftpretty which is a maintained fork of pysftp.
Testing notes:
ImportERRORshould appear