From fe1d7f4fd41d2154493442b5792b8d2f943ea15e Mon Sep 17 00:00:00 2001 From: "NODA, Kai" Date: Tue, 10 Apr 2018 03:58:15 +0800 Subject: [PATCH] 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 --- stdlib/3/ssl.pyi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/3/ssl.pyi b/stdlib/3/ssl.pyi index 060bccdcd..927547d4f 100644 --- a/stdlib/3/ssl.pyi +++ b/stdlib/3/ssl.pyi @@ -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] = ...,