mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Fixed the semantic of timeout for socket.create_connection and
all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :)
This commit is contained in:
parent
f18a707205
commit
4f1b1ed975
24 changed files with 231 additions and 180 deletions
|
|
@ -76,7 +76,8 @@ class POP3:
|
|||
"""
|
||||
|
||||
|
||||
def __init__(self, host, port=POP3_PORT, timeout=None):
|
||||
def __init__(self, host, port=POP3_PORT,
|
||||
timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.sock = socket.create_connection((host, port), timeout)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue