ssl.SSLContext(protocol) >= 3.5 has a default value (#2007)

Fix #1947

As discussed, pretended all 3.5.* have the default value although it was actually 3.5.3 which introduced it
This commit is contained in:
NODA, Kai
2018-04-10 03:58:15 +08:00
committed by Jelle Zijlstra
parent 81a6ea43a5
commit fe1d7f4fd4

View File

@@ -207,7 +207,10 @@ class SSLContext:
if sys.version_info >= (3, 4):
verify_flags = ... # type: int
verify_mode = ... # type: int
def __init__(self, protocol: int) -> None: ...
if sys.version_info >= (3, 5):
def __init__(self, protocol: int = ...) -> None: ...
else:
def __init__(self, protocol: int) -> None: ...
if sys.version_info >= (3, 4):
def cert_store_stats(self) -> Dict[str, int]: ...
def load_cert_chain(self, certfile: str, keyfile: Optional[str] = ...,