@@ -33,34 +33,35 @@ else:
3333 _WRAPPED : Literal ["WRAPPED" ]
3434 _SHUTDOWN : Literal ["SHUTDOWN" ]
3535
36- class _SSLPipe :
36+ if sys .version_info < (3 , 11 ):
37+ class _SSLPipe :
3738
38- max_size : ClassVar [int ]
39+ max_size : ClassVar [int ]
3940
40- _context : ssl .SSLContext
41- _server_side : bool
42- _server_hostname : str | None
43- _state : str
44- _incoming : ssl .MemoryBIO
45- _outgoing : ssl .MemoryBIO
46- _sslobj : ssl .SSLObject | None
47- _need_ssldata : bool
48- _handshake_cb : Callable [[BaseException | None ], None ] | None
49- _shutdown_cb : Callable [[], None ] | None
50- def __init__ (self , context : ssl .SSLContext , server_side : bool , server_hostname : str | None = ...) -> None : ...
51- @property
52- def context (self ) -> ssl .SSLContext : ...
53- @property
54- def ssl_object (self ) -> ssl .SSLObject | None : ...
55- @property
56- def need_ssldata (self ) -> bool : ...
57- @property
58- def wrapped (self ) -> bool : ...
59- def do_handshake (self , callback : Callable [[BaseException | None ], None ] | None = ...) -> list [bytes ]: ...
60- def shutdown (self , callback : Callable [[], None ] | None = ...) -> list [bytes ]: ...
61- def feed_eof (self ) -> None : ...
62- def feed_ssldata (self , data : bytes , only_handshake : bool = ...) -> tuple [list [bytes ], list [bytes ]]: ...
63- def feed_appdata (self , data : bytes , offset : int = ...) -> tuple [list [bytes ], int ]: ...
41+ _context : ssl .SSLContext
42+ _server_side : bool
43+ _server_hostname : str | None
44+ _state : str
45+ _incoming : ssl .MemoryBIO
46+ _outgoing : ssl .MemoryBIO
47+ _sslobj : ssl .SSLObject | None
48+ _need_ssldata : bool
49+ _handshake_cb : Callable [[BaseException | None ], None ] | None
50+ _shutdown_cb : Callable [[], None ] | None
51+ def __init__ (self , context : ssl .SSLContext , server_side : bool , server_hostname : str | None = ...) -> None : ...
52+ @property
53+ def context (self ) -> ssl .SSLContext : ...
54+ @property
55+ def ssl_object (self ) -> ssl .SSLObject | None : ...
56+ @property
57+ def need_ssldata (self ) -> bool : ...
58+ @property
59+ def wrapped (self ) -> bool : ...
60+ def do_handshake (self , callback : Callable [[BaseException | None ], None ] | None = ...) -> list [bytes ]: ...
61+ def shutdown (self , callback : Callable [[], None ] | None = ...) -> list [bytes ]: ...
62+ def feed_eof (self ) -> None : ...
63+ def feed_ssldata (self , data : bytes , only_handshake : bool = ...) -> tuple [list [bytes ], list [bytes ]]: ...
64+ def feed_appdata (self , data : bytes , offset : int = ...) -> tuple [list [bytes ], int ]: ...
6465
6566class _SSLProtocolTransport (transports ._FlowControlMixin , transports .Transport ):
6667
@@ -101,9 +102,6 @@ else:
101102 _SSLProtocolBase : TypeAlias = protocols .Protocol
102103
103104class SSLProtocol (_SSLProtocolBase ):
104- if sys .version_info >= (3 , 11 ):
105- max_size : ClassVar [int ]
106-
107105 _server_side : bool
108106 _server_hostname : str | None
109107 _sslcontext : ssl .SSLContext
@@ -113,16 +111,20 @@ class SSLProtocol(_SSLProtocolBase):
113111 _waiter : futures .Future [Any ]
114112 _loop : events .AbstractEventLoop
115113 _app_transport : _SSLProtocolTransport
116- _sslpipe : _SSLPipe | None
117- _session_established : bool
118- _in_handshake : bool
119- _in_shutdown : bool
120114 _transport : transports .BaseTransport | None
121- _call_connection_made : bool
122115 _ssl_handshake_timeout : int | None
123116 _app_protocol : protocols .BaseProtocol
124117 _app_protocol_is_buffer : bool
125118
119+ if sys .version_info >= (3 , 11 ):
120+ max_size : ClassVar [int ]
121+ else :
122+ _sslpipe : _SSLPipe | None
123+ _session_established : bool
124+ _call_connection_made : bool
125+ _in_handshake : bool
126+ _in_shutdown : bool
127+
126128 if sys .version_info >= (3 , 11 ):
127129 def __init__ (
128130 self ,
0 commit comments