bpo-29970: Make ssh_handshake_timeout None by default#4939
bpo-29970: Make ssh_handshake_timeout None by default#4939asvetlov merged 7 commits intopython:masterfrom
Conversation
Add a check for passing the parameter only with ssl context.
Lib/asyncio/base_events.py
Outdated
|
|
||
| if ssl_handshake_timeout is not None and not ssl: | ||
| raise ValueError( | ||
| 'ssl_handshake_timeout is only meaningfu with ssl') |
|
BTW, what happens if someone passes |
|
zero and negative timeout is an error but I doubt if we should prohibit it: there still is a possibility to pass |
In many APIs, passing |
|
I vote for raising an error for If someone passes |
|
Ok, will add a code for raising |
|
Done |
| sslcontext = test_utils.dummy_ssl_context() | ||
| app_proto = mock.Mock() | ||
| waiter = mock.Mock() | ||
| with self.assertRaises(ValueError): |
|
Wait, please use |
Float default prevents checking for passing
ssh_handshake_timeoutwith plain socket connection.Raise
ValueErrorifssh_handshake_timeoutis specified withoutssl.Postfix for #4825
https://bugs.python.org/issue29970