Skip to content

Commit 3c43806

Browse files
authored
gh-74166: make all_errors keyword-only (GH-91704)
1 parent a059395 commit 3c43806

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Doc/library/socket.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ The following functions all create :ref:`socket objects <socket-objects>`.
660660
Windows support added.
661661

662662

663-
.. function:: create_connection(address[, timeout[, source_address[, all_errors]]])
663+
.. function:: create_connection(address, timeout=GLOBAL_DEFAULT, source_address=None, *, all_errors=False)
664664

665665
Connect to a TCP service listening on the internet *address* (a 2-tuple
666666
``(host, port)``), and return the socket object. This is a higher-level

Lib/socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ def getfqdn(name=''):
806806
_GLOBAL_DEFAULT_TIMEOUT = object()
807807

808808
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
809-
source_address=None, all_errors=False):
809+
source_address=None, *, all_errors=False):
810810
"""Connect to *address* and return the socket object.
811811
812812
Convenience function. Connect to *address* (a 2-tuple ``(host,

0 commit comments

Comments
 (0)