-
Notifications
You must be signed in to change notification settings - Fork 137
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
feat: remove paramiko #1606
feat: remove paramiko #1606
Conversation
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.
Almost forgot: This PR introduced some clutter in the form on line break removals. I can fix that during merging though.
Yeah, the pre-commit hooks made some deletions after my changes 😅 |
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.
minor consistency change
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.
Looks good. It's not a big shiny feature, but an important incremental improvement and refactoring.
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.
LGTM.
Thanks for your patience. You wanna merge this, @real-yfprojects ? There was some note on formatting you added. Also needs squashing. |
9fdee76
Paramiko is a encryption key parsing library. It was used for determining which ssh keys are available on the system. This removes that fairly heavy dependency at replaces it with a very basic heuristic to determine ssh key file by their first line containing `-----BEGIN(\s\w+)? PRIVATE KEY-----`. * src/vorta/utils.py: Implement `is_ssh_private_key_file`. * src/vorta/utils.py (get_private_keys): Use `is_ssh_private_key_file` instead of paramiko. Enforce `077` permissions on key files. * src/vorta/views/ssh_dialog.py : Remove paramiko. * src/vorta/views/repo_tab.py (RepoTab.init_ssh): Show filename only in `sshComboBox`. * src/vorta/views/repo_add_dialog.py (AddRepoWindow.init_ssh_key): Show filename only in `sshComboBox`.
Paramiko is a encryption key parsing library. It was used for determining which ssh keys are available on the system. This removes that fairly heavy dependency at replaces it with a very basic heuristic to determine ssh key file by their first line containing `-----BEGIN(\s\w+)? PRIVATE KEY-----`. * src/vorta/utils.py: Implement `is_ssh_private_key_file`. * src/vorta/utils.py (get_private_keys): Use `is_ssh_private_key_file` instead of paramiko. Enforce `077` permissions on key files. * src/vorta/views/ssh_dialog.py : Remove paramiko. * src/vorta/views/repo_tab.py (RepoTab.init_ssh): Show filename only in `sshComboBox`. * src/vorta/views/repo_add_dialog.py (AddRepoWindow.init_ssh_key): Show filename only in `sshComboBox`.
Description
Removed paramiko as a dependency and replaced it with a simple function that checks the first line of a file to verify if it's a ssh key.
Related Issue
#1559
Motivation and Context
Helped remove a heavy dependecy used just for checking if a file is a SSH key.
How Has This Been Tested?
Checked the combobox options
Screenshots (if appropriate):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.