mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 22:11:54 +08:00
ssl, sysconfig: fix issues with defaults (#9507)
- ssl._create_unverified_context allows None since 3.10:2875c603b2 (diff-f6439be9c66350dde4c35dbeea0352c96cc970ba12b0478f6ae36f10725bd8c5)- sysconfig.is_python_build ignores its argument since 3.11:067597522a(was backported into 3.11)
This commit is contained in:
@@ -63,18 +63,34 @@ def create_default_context(
|
||||
capath: StrOrBytesPath | None = ...,
|
||||
cadata: str | ReadableBuffer | None = ...,
|
||||
) -> SSLContext: ...
|
||||
def _create_unverified_context(
|
||||
protocol: int = ...,
|
||||
*,
|
||||
cert_reqs: int = ...,
|
||||
check_hostname: bool = ...,
|
||||
purpose: Purpose = ...,
|
||||
certfile: StrOrBytesPath | None = ...,
|
||||
keyfile: StrOrBytesPath | None = ...,
|
||||
cafile: StrOrBytesPath | None = ...,
|
||||
capath: StrOrBytesPath | None = ...,
|
||||
cadata: str | ReadableBuffer | None = ...,
|
||||
) -> SSLContext: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def _create_unverified_context(
|
||||
protocol: int | None = None,
|
||||
*,
|
||||
cert_reqs: int = ...,
|
||||
check_hostname: bool = ...,
|
||||
purpose: Purpose = ...,
|
||||
certfile: StrOrBytesPath | None = ...,
|
||||
keyfile: StrOrBytesPath | None = ...,
|
||||
cafile: StrOrBytesPath | None = ...,
|
||||
capath: StrOrBytesPath | None = ...,
|
||||
cadata: str | ReadableBuffer | None = ...,
|
||||
) -> SSLContext: ...
|
||||
|
||||
else:
|
||||
def _create_unverified_context(
|
||||
protocol: int = ...,
|
||||
*,
|
||||
cert_reqs: int = ...,
|
||||
check_hostname: bool = ...,
|
||||
purpose: Purpose = ...,
|
||||
certfile: StrOrBytesPath | None = ...,
|
||||
keyfile: StrOrBytesPath | None = ...,
|
||||
cafile: StrOrBytesPath | None = ...,
|
||||
capath: StrOrBytesPath | None = ...,
|
||||
cadata: str | ReadableBuffer | None = ...,
|
||||
) -> SSLContext: ...
|
||||
|
||||
_create_default_https_context: Callable[..., SSLContext]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user