summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2022-11-04 17:45:46 -0400
committerJeff Forcier <jeff@bitprophet.org>2022-11-04 17:58:44 -0400
commit94110e151ce57b78225aab7ae9d227ab2b6d7edd (patch)
treedae87172bfcefd2261516bc0ad1cf2253b6ad3f7
parent3d4e999e240729567663df8a6cddebc68e2983ff (diff)
downloadparamiko-94110e151ce57b78225aab7ae9d227ab2b6d7edd.tar.gz
Docstring tweaks, changelog entry, re #2125
-rw-r--r--paramiko/client.py8
-rw-r--r--sites/www/changelog.rst4
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