]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-74166: make all_errors keyword-only (GH-91704)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Tue, 19 Apr 2022 17:16:20 +0000 (18:16 +0100)
committerGitHub <noreply@github.com>
Tue, 19 Apr 2022 17:16:20 +0000 (18:16 +0100)
Doc/library/socket.rst
Lib/socket.py

index d7a440127ec930098abe70a4d0ac072bd63da9c9..cff5a32afb464d9db43a9fdeb86d20e9c24a463b 100755 (executable)
@@ -660,7 +660,7 @@ The following functions all create :ref:`socket objects <socket-objects>`.
       Windows support added.
 
 
-.. function:: create_connection(address[, timeout[, source_address[, all_errors]]])
+.. function:: create_connection(address, timeout=GLOBAL_DEFAULT, source_address=None, *, all_errors=False)
 
    Connect to a TCP service listening on the internet *address* (a 2-tuple
    ``(host, port)``), and return the socket object.  This is a higher-level
index 28d9c89d601aa3b40a59e82b0badb90ac50e1a6c..e08fb620eb1be2264897fa48db0a486b2d99e0a0 100755 (executable)
@@ -806,7 +806,7 @@ def getfqdn(name=''):
 _GLOBAL_DEFAULT_TIMEOUT = object()
 
 def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
-                      source_address=None, all_errors=False):
+                      source_address=None, *, all_errors=False):
     """Connect to *address* and return the socket object.
 
     Convenience function.  Connect to *address* (a 2-tuple ``(host,