mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Remove ClassVar from SSLContext.ssl{object,socket}_class (#7465)
These attributes have class-level defaults, but the docs explicitly state that it's OK to override them on instances. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import enum
|
||||
import socket
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, Self, StrOrBytesPath, WriteableBuffer
|
||||
from typing import Any, Callable, ClassVar, Iterable, NamedTuple, Optional, Union, overload
|
||||
from typing import Any, Callable, Iterable, NamedTuple, Optional, Union, overload
|
||||
from typing_extensions import Literal, TypedDict, final
|
||||
|
||||
_PCTRTT = tuple[tuple[str, str], ...]
|
||||
@@ -393,8 +393,11 @@ class SSLContext:
|
||||
maximum_version: TLSVersion
|
||||
minimum_version: TLSVersion
|
||||
sni_callback: Callable[[SSLObject, str, SSLContext], None | int] | None
|
||||
sslobject_class: ClassVar[type[SSLObject]]
|
||||
sslsocket_class: ClassVar[type[SSLSocket]]
|
||||
# The following two attributes have class-level defaults.
|
||||
# However, the docs explicitly state that it's OK to override these attributes on instances,
|
||||
# so making these ClassVars wouldn't be appropriate
|
||||
sslobject_class: type[SSLObject]
|
||||
sslsocket_class: type[SSLSocket]
|
||||
if sys.version_info >= (3, 8):
|
||||
keylog_filename: str
|
||||
post_handshake_auth: bool
|
||||
|
||||
Reference in New Issue
Block a user