Skip to content

Commit 963d286

Browse files
authored
Support Paramiko 5 (#69712)
1 parent 4d3cd1e commit 963d286

8 files changed

Lines changed: 174 additions & 171 deletions

File tree

‎providers/sftp/README.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ PIP package Version required
5757
``apache-airflow`` ``>=2.11.0``
5858
``apache-airflow-providers-ssh`` ``>=6.0.0``
5959
``apache-airflow-providers-common-compat`` ``>=1.12.0``
60-
``paramiko`` ``>=4.0.0,<5.0.0``
60+
``paramiko`` ``>=4.0.0``
6161
``asyncssh`` ``>=2.12.0; python_version < "3.14"``
6262
``asyncssh`` ``>=2.22.0; python_version >= "3.14"``
6363
========================================== ======================================

‎providers/sftp/docs/index.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ PIP package Version required
104104
``apache-airflow`` ``>=2.11.0``
105105
``apache-airflow-providers-ssh`` ``>=6.0.0``
106106
``apache-airflow-providers-common-compat`` ``>=1.12.0``
107-
``paramiko`` ``>=4.0.0,<5.0.0``
107+
``paramiko`` ``>=4.0.0``
108108
``asyncssh`` ``>=2.12.0; python_version < "3.14"``
109109
``asyncssh`` ``>=2.22.0; python_version >= "3.14"``
110110
========================================== ======================================

‎providers/sftp/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ dependencies = [
6363
"apache-airflow>=2.11.0",
6464
"apache-airflow-providers-ssh>=6.0.0",
6565
"apache-airflow-providers-common-compat>=1.12.0",
66-
"paramiko>=4.0.0,<5.0.0",
66+
"paramiko>=4.0.0",
6767
"asyncssh>=2.12.0; python_version < '3.14'",
6868
"asyncssh>=2.22.0; python_version >= '3.14'",
6969
]

‎providers/ssh/README.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ PIP package Version required
5656
``apache-airflow`` ``>=2.11.0``
5757
``apache-airflow-providers-common-compat`` ``>=1.12.0``
5858
``asyncssh`` ``>=2.12.0``
59-
``paramiko`` ``>=4.0.0,<5.0.0``
59+
``paramiko`` ``>=4.0.0``
6060
========================================== ==================
6161

6262
The changelog for the provider package can be found in the

‎providers/ssh/docs/index.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ PIP package Version required
9595
``apache-airflow`` ``>=2.11.0``
9696
``apache-airflow-providers-common-compat`` ``>=1.12.0``
9797
``asyncssh`` ``>=2.12.0``
98-
``paramiko`` ``>=4.0.0,<5.0.0``
98+
``paramiko`` ``>=4.0.0``
9999
========================================== ==================
100100

101101
Downloading official packages

‎providers/ssh/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ dependencies = [
6262
"apache-airflow>=2.11.0",
6363
"apache-airflow-providers-common-compat>=1.12.0",
6464
"asyncssh>=2.12.0",
65-
"paramiko>=4.0.0,<5.0.0",
65+
"paramiko>=4.0.0",
6666

6767
]
6868

‎providers/ssh/src/airflow/providers/ssh/hooks/ssh.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,10 @@ def _pkey_from_private_key(self, private_key: str, passphrase: str | None = None
444444
key = pkey_class.from_private_key(StringIO(private_key), password=passphrase)
445445
# Test it actually works. If Paramiko loads an openssh generated key, sometimes it will
446446
# happily load it as the wrong type, only to fail when actually used.
447-
key.sign_ssh_data(b"")
447+
if key.get_name() == "ssh-rsa":
448+
key.sign_ssh_data(b"", algorithm="rsa-sha2-512")
449+
else:
450+
key.sign_ssh_data(b"")
448451
return key
449452
except (paramiko.ssh_exception.SSHException, ValueError):
450453
continue

‎uv.lock‎

Lines changed: 164 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)