diff options
-rw-r--r-- | paramiko/client.py | 8 | ||||
-rw-r--r-- | sites/www/changelog.rst | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/paramiko/client.py b/paramiko/client.py index b1c60db8..80cc2ec6 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -315,8 +315,10 @@ class SSHClient(ClosingContextManager): :param dict disabled_algorithms: an optional dict passed directly to `.Transport` and its keyword argument of the same name. - :param transport_factory: an optional callable that takes in a new `socket` - `gss_kex`, `gss_deleg_creds`, `disabled_algorithms` and generates a + :param transport_factory: + an optional callable which is handed a subset of the constructor + arguments (primarily those related to the socket, GSS + functionality, and algorithm selection) and generates a `.Transport` instance to be used by this client. Defaults to `.Transport.__init__`. @@ -338,6 +340,8 @@ class SSHClient(ClosingContextManager): Added the ``passphrase`` argument. .. versionchanged:: 2.6 Added the ``disabled_algorithms`` argument. + .. versionchanged:: 2.12 + Added the ``transport_factory`` argument. """ if not sock: errors = {} diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 556ed019..603e1ad8 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,10 @@ Changelog ========= +- :feature:`2125` (also re: :issue:`2054`) Add a ``transport_factory`` kwarg to + `SSHClient.connect <paramiko.client.SSHClient.connect>` for advanced + users to gain more control over early Transport setup and manipulation. + Thanks to Noah Pederson for the patch. - :bug:`1822` (via, and relating to, far too many other issues to mention here) Update `~paramiko.client.SSHClient` so it explicitly closes its wrapped socket object upon encountering socket errors at connection time. This should |