diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2017-12-20 18:24:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-20 18:24:43 (GMT) |
commit | 51eb1c6b9c0b382dfd6e0428eacff0c7891a6fc3 (patch) | |
tree | c9043b4a9f959fe562a695ec35cb0718101110e9 /Lib/asyncio/events.py | |
parent | a7a751dd7b08a5bb6cb399c1b2a6ca7b24aba51d (diff) | |
download | cpython-51eb1c6b9c0b382dfd6e0428eacff0c7891a6fc3.zip cpython-51eb1c6b9c0b382dfd6e0428eacff0c7891a6fc3.tar.gz cpython-51eb1c6b9c0b382dfd6e0428eacff0c7891a6fc3.tar.bz2 |
bpo-29970: Make ssh_handshake_timeout None by default (#4939)
* Make ssh_handshake_timeout None by default.
* Raise ValueError if ssl_handshake_timeout is used without ssl.
* Raise ValueError if ssl_handshake_timeout is not positive.
Diffstat (limited to 'Lib/asyncio/events.py')
-rw-r--r-- | Lib/asyncio/events.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py index c9033c0..3a5dbad 100644 --- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -17,7 +17,6 @@ import subprocess import sys import threading -from . import constants from . import format_helpers @@ -255,7 +254,7 @@ class AbstractEventLoop: *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, - ssl_handshake_timeout=constants.SSL_HANDSHAKE_TIMEOUT): + ssl_handshake_timeout=None): raise NotImplementedError async def create_server( @@ -263,7 +262,7 @@ class AbstractEventLoop: *, family=socket.AF_UNSPEC, flags=socket.AI_PASSIVE, sock=None, backlog=100, ssl=None, reuse_address=None, reuse_port=None, - ssl_handshake_timeout=constants.SSL_HANDSHAKE_TIMEOUT): + ssl_handshake_timeout=None): """A coroutine which creates a TCP server bound to host and port. The return value is a Server object which can be used to stop @@ -310,13 +309,13 @@ class AbstractEventLoop: self, protocol_factory, path=None, *, ssl=None, sock=None, server_hostname=None, - ssl_handshake_timeout=constants.SSL_HANDSHAKE_TIMEOUT): + ssl_handshake_timeout=None): raise NotImplementedError async def create_unix_server( self, protocol_factory, path=None, *, sock=None, backlog=100, ssl=None, - ssl_handshake_timeout=constants.SSL_HANDSHAKE_TIMEOUT): + ssl_handshake_timeout=None): """A coroutine which creates a UNIX Domain Socket server. The return value is a Server object, which can be used to stop |