Skip to content

Commit 9a71d70

Browse files
committed
Use the same sentinel as in the stdlib socket.py for create_connection() in future.backports.socket
1 parent edc321a commit 9a71d70

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/future/backports/socket.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,10 @@ def getfqdn(name=''):
410410
return name
411411

412412

413-
_GLOBAL_DEFAULT_TIMEOUT = object()
413+
# Re-use the same sentinel as in the Python stdlib socket module:
414+
from socket import _GLOBAL_DEFAULT_TIMEOUT
415+
# Was: _GLOBAL_DEFAULT_TIMEOUT = object()
416+
414417

415418
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
416419
source_address=None):

0 commit comments

Comments
 (0)