Skip to content
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

client: make most connect args keyword-only, and re-order them #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions paramiko/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,22 +190,23 @@ def connect(
port=SSH_PORT,
username=None,
password=None,
*,
passphrase=None,
pkey=None,
key_filename=None,
timeout=None,
allow_agent=True,
look_for_keys=True,
allow_agent=True,
timeout=None,
banner_timeout=None,
handshake_timeout=None,
auth_timeout=None,
compress=False,
sock=None,
gss_auth=False,
gss_kex=False,
gss_deleg_creds=True,
gss_host=None,
banner_timeout=None,
auth_timeout=None,
gss_trust_dns=True,
passphrase=None,
handshake_timeout=None,
):
"""
Connect to an SSH server and authenticate to it. The server's host key
Expand Down Expand Up @@ -240,9 +241,6 @@ def connect(
If a private key requires a password to unlock it, and a password is
passed in, that password will be used to attempt to unlock the key.

Note that the following parameters are documented in a different
(more logical) order than they have in the function signature.

:param str hostname: the server to connect to
:param int port: the server port to connect to
:param str username:
Expand Down Expand Up @@ -307,6 +305,8 @@ def connect(
Added the ``passphrase`` argument.
.. versionchanged:: 2.9
Added the ``handshake_timeout`` argument.
.. versionchanged:: 3.0
Made most arguments keyword-only and re-ordered them.
"""
if not sock:
sock = retry_on_signal(
Expand Down