diff --git a/stdlib/ssl.pyi b/stdlib/ssl.pyi index 4a7cb2b65..83932e579 100644 --- a/stdlib/ssl.pyi +++ b/stdlib/ssl.pyi @@ -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